开发者

Ruby on Rails - jQuery javascripts as default

开发者 https://www.devze.com 2023-01-24 12:07 出处:网络
I have added this to my config/application.rb file: config.action_view.javascript_expa开发者_如何学JAVAnsions[:defaults] = %w(jquery rails application)

I have added this to my config/application.rb file:

config.action_view.javascript_expa开发者_如何学JAVAnsions[:defaults] = %w(jquery rails application)

and I have added this to my views/layouts/application.html.erb file:

<%= javascript_include_tag :defaults %>

But the prototype javascript files are being included and not the jQuery files when the pages are rendered. Any ideas why this is happening?


I usually just add https://github.com/indirect/jquery-rails as a development gem, and then run the generators. Haven't run into an issue yet.


Restarted the server and that fixed the problem.


Now it is supported by default

0

精彩评论

暂无评论...
验证码 换一张
取 消