Permalink
Browse files

User config.action_view_javascript_expansions[:defaults] instead of c…

…reating an initializer file.
  • Loading branch information...
1 parent 17e4a9f commit ccfd88d1af0a3246739b4ff98281f07e82ead0ab @siong1987 siong1987 committed with josevalim Sep 10, 2010
Showing with 3 additions and 8 deletions.
  1. +3 −8 README.rdoc
View
@@ -19,16 +19,11 @@ Copy rails.js from http://github.com/rails/jquery-ujs/raw/master/src/rails.js in
=== Step 3 (optional)
-Create an initializer to switch the javascript_include_tag :defaults to use jquery instead of the default prototype helpers.
+Switch the javascript_include_tag :defaults to use jquery instead of the default prototype helpers.
-file config/initializers/jquery.rb
+file config/application.rb
- module ActionView::Helpers::AssetTagHelper
- remove_const :JAVASCRIPT_DEFAULT_SOURCES
- JAVASCRIPT_DEFAULT_SOURCES = %w(jquery.js rails.js)
-
- reset_javascript_include_default
- end
+ config.action_view.javascript_expansions[:defaults] = %w(jquery rails application)
= Testing

1 comment on commit ccfd88d

@nsinghonyx

awesome I did not know this feature existed. Sweet !!!

Please sign in to comment.