0

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

config.action_view.javascript_expansions[: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?

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, this is what I have done, the correct files are added to my public/javascripts folder, but they are not being referenced by <%= javascript_include_tag :defaults %>
0

Restarted the server and that fixed the problem.

Comments

0

Now it is supported by default

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.