I currently switching from prototype to jquery mainly to support simple ajax file upload. I use : https://github.com/indirect/jquery-rails
95% of javascript code is made by rails helper such as :
- remote_function
- render :update do |page|
- page.replace_html 'id', :partial => 'content'
- page['form']['name'] = something
- page.visual_effect :highlight, 'head_success'
...
I understand that the 5% of code purely prototype I have to rewrite it for Jquery, but what about the rest ? Do I have to rewrite it all in raw jquery ?
I use :
all that helpers are deprecated in favor of unobtrusive javascript (it doesn't matter if you're using jQuery or PrototypeJS).
you can find a detailed guide here:
http://www.simonecarletti.com/blog/2010/06/unobtrusive-javascript-in-rails-3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With