Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-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 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
- Loading branch information
1 parent
cecccf1
commit 708e094
Showing
8 changed files
with
6,309 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhhh ya!
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an awesome change.
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweeeeeeeeeet!
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w00t! Thank you for putting this up :)
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there was much rejoycing!
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats sweet,
is there some sort of plugin hook in order to find out at runtime which javascript framework is currently used in a given Rails app ?
I can think of a couple of examples where that would be really awesome to be able to read some parameter of that sort when initializing.
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..and here's hoping that in future the default too shall reflect the will of the majority.
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asanghi
open source != democracy
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is nice, especially since we use jquery :)
however, wouldn't it make more sense to insulate such things into separate gems with (if needed) a well-defined API, like for the ORMs ?
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elisehuard
I think there's a gem that will add a generator for you:
http://github.com/indirect/jquery-rails
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elisehuard the reason that I wrote this patch is more and more people want to use jQuery as the default Javascript library for Rails. And, there are actually many jquery gem out there.
But, wouldn't it be nice that we can get it just by using a simple approach like with the "-j" parameter?
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I'm happy to see this commit, as a JQuery user you would still need to add the jQuery file yourself, while prototype works out of the box.
Shouldn't we also add the latest jQuery file to rails if we go this path?
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jquery.js file was added. Look at the top of this commit page.
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josevalim yeah I saw that too late, sorry. I tried to delete my comment, but that didn't work apparently :)
708e094
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point it was already in everyone's e-mail. ;)