Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

adding "-j" parameter for "rails new" command

#5613

it seems like there are more and more people using "jquery" as the default javascript library when they start up a new rails app.

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".

Reported by siong1987 · September 11th, 2010 @ 08:29 AM

State: committed
Milestone: 3.1
Assigned to: Santiago Pastorino Santiago Pastorino
Importance: Low

Activity

  1. Mikel Lindsaar
    Mikel Lindsaar
    • Milestone set to 3.1
    • Assigned user set to Mikel Lindsaar
    • Importance changed from to Low

    You should post this idea on the rails-core mailing list, get some +1's and verifs.

    September 11th, 2010 @ 08:35 AM

  2. siong1987
  3. siong1987
  4. Victor Ng
    Victor Ng

    Great effort. I think most Web 2.0 websites today include jQuery as their default library.

    October 1st, 2010 @ 09:49 AM

  5. Aditya Sanghi
  6. Aditya Sanghi
    Aditya Sanghi

    +1 We <3 jQuery. Way to go.

    October 2nd, 2010 @ 08:20 PM

  7. David Trasbo
    David Trasbo
    • State changed from new to wontfix

    The pull request (http://github.com/rails/rails/pull/16) has been closed. Marking this wontfix for now.

    October 8th, 2010 @ 09:33 AM

  8. siong1987
    siong1987

    David,

    The pull request is closed because the core team wants me to get others in the core team to support this ticket. And, hence, I put up this ticket here.

    You might have to reopen this ticket so that others can look at this ticket.

    October 8th, 2010 @ 02:07 PM

  9. Santiago Pastorino
    Santiago Pastorino
    • State changed from wontfix to open

    October 8th, 2010 @ 02:38 PM

  10. Santiago Pastorino
    Santiago Pastorino
    • Assigned user changed from Mikel Lindsaar to Santiago Pastorino

    October 11th, 2010 @ 08:20 PM

  11. Santiago Pastorino
    Santiago Pastorino

    siong1987 I'd like to know what is your latest patch related to this and if it's rebased because I know there were one as a pull request. Thank you.

    October 11th, 2010 @ 09:00 PM

  12. siong1987
    siong1987

    The patch(September 13th, 2010 @ 07:56 PM) I last submitted here should be the latest.

    The pull request might be a bit too old and it might not have the latest changes I made.

    October 11th, 2010 @ 09:56 PM

  13. Santiago Pastorino
    Santiago Pastorino

    Good siong1987 but one thing you're doing this

    +        copy_file "public/javascripts/#{@options[:javascript]}_ujs.js", "public/javascripts/rails.js"
    +        copy_file "public/javascripts/#{@options[:javascript]}_ujs.js", "public/javascripts/rails.js"
    

    twice

    October 11th, 2010 @ 10:03 PM

  14. siong1987
    siong1987

    Oh shit. I totally missed that line. Do you want me to resubmit a new patch again?

    October 11th, 2010 @ 10:18 PM

  15. Santiago Pastorino
  16. Repository
    Repository
    • State changed from open to committed

    (from [708e09448ba41c45f189c6b1adc989eba8994b20]) -j parameter added to rails new command.

    Now you can start your apps with jquery with rails new myapp -j jquery, the default is still prototype

    [#5613 adding "-j" parameter for "rails new" command state:committed]

    Signed-off-by: Santiago Pastorino santiago@wyeworks.com
    http://github.com/rails/rails/commit/708e09448ba41c45f189c6b1adc989...

    October 11th, 2010 @ 10:55 PM

  17. siong1987
  18. Santiago Pastorino
    Santiago Pastorino

    You're welcome and please keep helping.
    This issue was around since the discussion about ujs started.
    But this kind of stuff needs a deep discussion, so the patch you did was really helpful to make it easier the discussion.

    October 12th, 2010 @ 12:07 AM

  19. Ches Martin
    Ches Martin
    • Tag changed from javascript, jquery, rails3.0.0 to appgenerator, javascript, jquery, rails3.0.0

    There's a small problem with this which I've addressed in #6112 app generator not including script.aculo.us with prototype -- if that passes review, may want to make sure the ticket is flagged for the same milestone as this one.

    December 8th, 2010 @ 08:13 PM