开发者

Ruby on Rails - jQuery javascripts as default

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜