Reputation: 673
Why is there a jQuery gem for rails 3.1? Seems easier to simply put the single minified file in the javascripts assets folder. Is it for code organization? (All prerequisites in the Gemfile). Is there something I'm missing?
Thanks so much!
Upvotes: 4
Views: 260
Reputation: 85794
The Rails jQuery gem allows the developer to not only use jQuery in their own scripts, but also hooks up fancy Rails helpers like remote_form_for
to use jQuery for communication. So, not only does the gem provide the library, but it also provides Rails-specific hooks that would be a pain to code on one's own.
Upvotes: 5