How to swap jquery for prototype in Rails 3.1

送分小仙女□ 提交于 2019-12-06 07:52:39
  1. Remove the jquery gem from Gemfile
  2. add prototype-rails to it

From https://github.com/rails/prototype-rails:

You may want to add them to your app/assets/javascripts/application.js:

//= require prototype
//= require prototype_ujs
//= require effects
//= require dragdrop
//= require controls

New applications using this may also want to add

config.action_view.debug_rjs = true

to their config/environments/development.rb.

diodeus is right, i'd rewrite it, and take it as a great opportunity to improve the code ;) nevertheless i'm curious, why would you wanna switch TO prototype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!