"-j" parameter to select vendor javascript library when starting new Rails app

6 views
Skip to first unread message

siong1987

unread,
Sep 10, 2010, 6:31:20 PM9/10/10
to Ruby on Rails: Core
so, for now, we have a "-d" parameter when starting up a new Rails
application with options like "mysql", "sqlite3", etc.

do you all think that is it a good idea to have a "-j" parameter that
could get options like "jquery" and "prototype" so that the preferred
javascript library is used when starting up a new Rails app?

siong.

Lailson Bandeira

unread,
Sep 10, 2010, 7:50:00 PM9/10/10
to rubyonra...@googlegroups.com
This would be great!
--
LAILSON BANDEIRA
http://lailsonbandeira.com/



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-co...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.


Teng Siong Ong

unread,
Sep 10, 2010, 10:06:06 PM9/10/10
to rubyonra...@googlegroups.com
how others think about it? if someone from the core team could verity this issue, i will go ahead and implement it.

Teng Siong Ong

unread,
Sep 11, 2010, 3:30:52 AM9/11/10
to rubyonra...@googlegroups.com
patch added: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5613-adding-j-parameter-for-rails-new-command

for this patch, i removed the usual "--skip-prototype" parameter and substituted it with the "--skip-javascript" parameter. then, i added a new "-j" or "--javascript" parameter. this parameter accepts either "jquery" or "prototype".

btw, the default javascript library now is still "prototype".

siong.

Yehuda Katz

unread,
Sep 11, 2010, 4:22:01 AM9/11/10
to rubyonrails-core
Can you submit this as a pull request on GitHub?

Yehuda Katz
Architect | Engine Yard
(ph) 718.877.1325

radhames brito

unread,
Sep 11, 2010, 1:08:11 PM9/11/10
to rubyonra...@googlegroups.com
Great!!!

Teng Siong Ong

unread,
Sep 11, 2010, 3:13:47 PM9/11/10
to rubyonra...@googlegroups.com
pull request sent.

side note: i actually asked this question in the irc channel, in future, should we keep using the old school patch way or the github pull request way to patch?

siong.

Yehuda Katz

unread,
Sep 11, 2010, 3:30:45 PM9/11/10
to rubyonrails-core
I can't speak for the rest of the core team, but I personally am keeping a close eye on pull requests, which are much easier for me to work through than dealing with patches on LH (which require saving the patch, seeing if it applies, then reviewing, etc. etc.). Pull requests telescope the first 5 or 6 steps of reviewing patches on LightHouse into one step.

Yehuda Katz
Architect | Engine Yard
(ph) 718.877.1325


Teng Siong Ong

unread,
Sep 11, 2010, 5:30:33 PM9/11/10
to rubyonra...@googlegroups.com
i actually +1 for github pull request. they just made it a lot easier to use now. btw, my pull request has already been sent in. feel free to leave comments there. :)

siong.

Michael Koziarski

unread,
Sep 11, 2010, 7:52:51 PM9/11/10
to rubyonra...@googlegroups.com
> i actually +1 for github pull request. they just made it a lot easier to use
> now. btw, my pull request has already been sent in. feel free to leave
> comments there. :)

The most important thing for pull requests to get right is to make
community members (e.g. non committers) able to comment / review a
pull request. It seems the latest github release has done a pretty
good job with that.

--
Cheers

Koz

Teng Siong Ong

unread,
Sep 11, 2010, 8:07:02 PM9/11/10
to rubyonra...@googlegroups.com
btw, let's get on the topic here. it seems like we should discuss about whether we should include jquery as one of the default options in rails. if you actually look at the commit i did. the commit doesn't actually complicate the code much.

and, one obvious thing that everyone should have noticed recently is that more and more people prefer to use jquery as the default javascript library for rails. and, i think that is one of the reasons why the introduction of "config.action_view.javascript_expansions" in the latest rails 3.

so, i really think that this patch should be committed. i really want to see how other core members think about this.

siong.


--

Ryan Bigg

unread,
Sep 11, 2010, 9:03:30 PM9/11/10
to rubyonra...@googlegroups.com
Bonus: Github pull requests aren't full of spam like the lighthouse. I don't see what lighthouse offers that github issues doesn't.


Ryan Bigg

unread,
Sep 11, 2010, 9:05:42 PM9/11/10
to rubyonra...@googlegroups.com
Whilst it's obvious now that jQuery is the preferred library, there are a lot of applications already using prototype. I think because of this reason, the default should stay as Prototype.

Your patch to pass an option to switch to jQuery for a new application is fantastic.

Chad Woolley

unread,
Sep 11, 2010, 9:42:02 PM9/11/10
to rubyonra...@googlegroups.com
On Sat, Sep 11, 2010 at 6:03 PM, Ryan Bigg <radarl...@gmail.com> wrote:
> I don't see what lighthouse offers that github issues doesn't.

Search that actually works?

Yehuda Katz

unread,
Sep 11, 2010, 9:55:12 PM9/11/10
to rubyonra...@googlegroups.com
Just to be clear, I'm in favor of pull requests for patch management;
don't have a strong opinion about bug reports (yet)

Sent from my iPhone

Rodrigo Rosenfeld Rosas

unread,
Sep 11, 2010, 11:20:15 PM9/11/10
to rubyonra...@googlegroups.com
Github (or Gitorious) is certainly better for dealing with patch
reviews, but I would rather prefer Redmine over LH for issues
management. And it also have good integration with git repositories...
Furthermore there are plugins for dealing with Scrum or Kanban with
great interface. Redmine also supports sub-projects, several kinds of
reports and lots of great features and useful plugins...

Maybe we should create a new topic on this subject and another one for
discussing the default Javascript library...

Best regards,

Rodrigo.

Teng Siong Ong

unread,
Sep 11, 2010, 11:39:03 PM9/11/10
to rubyonra...@googlegroups.com
since when this has become a discussion about LH vs Github? man, stay focused! : )

Jose Valim has closed the issue, maybe we should seriously think about the "-j" parameter for the "rails new" command.

http://github.com/rails/rails/pull/16 < let's start the Github reviewing party here. : )

Reply all
Reply to author
Forward
0 new messages