views:

73

answers:

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?

A: 

inside your config/application.rb

config.action_view.javascript_expansions[:defaults] = ['jquery-1.4.2', 'rails']
Matt Briggs