Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery-Rails or jRails?

I'm having trouble understanding the difference between the jquery-rails ruby gem & jRails. I think they both cover ways of adding jQuery, but are installed in different ways? If so, which is the better way to go?

Or am I just off-base?

like image 796
reneruiz Avatar asked Dec 01 '25 01:12

reneruiz


1 Answers

jRails is a replacement for Prototype using RJS. For instance, you can use methods like form_remote_for, which create an AJAX form. In Rails 3.x the preferred method is to use UJS with :remote => true instead.

jquery-ujs is a replacement for Prototype using UJS. UJS is the preferred method of using jQuery in Rails 3.x.

More info: jQuery with Rails 3

like image 92
McStretch Avatar answered Dec 02 '25 14:12

McStretch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!