1

In a new rail 3 app I want to replace prototype with jquery, but my initializer script:

module ActionView::Helpers::AssetTagHelper
  remove_const :JAVASCRIPT_DEFAULT_SOURCES
  JAVASCRIPT_DEFAULT_SOURCES = %w(jquery-1.4.1.min rails)
  reset_javascript_include_default
end

won't work any more. I get:

constant ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES not defined

Any ideas?

1 Answer 1

3

inside your config/application.rb

config.action_view.javascript_expansions[:defaults] = ['jquery-1.4.2', 'rails']
Sign up to request clarification or add additional context in comments.

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.