Why is there a gem of jQuery for rails 3.1?

Why is there a gem of jQuery for rails 3.1? It seems easier to just put one thumbnail file in the javascripts assets folder. Is this for organizing code? (All prerequisites in the Gemfile). Is something missing?

Thank you very much!

+4
source share
1 answer

The Rails jQuery gem allows the developer not only to use jQuery in their own scripts, but also includes fancy Rails helpers such as remote_form_for to use jQuery for communication. Thus, not only does the gem provide a library, but it also provides Rails-specific bindings that would be a pain to code on one's own.

+5
source

Source: https://habr.com/ru/post/1384156/


All Articles