Created
June 5, 2010 21:08
-
-
Save elmariofredo/427001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch the javascript_include_tag :defaults to use jQuery instead of | |
# the default prototype helpers. | |
# Credits: http://webtech.union.rpi.edu/blog/2010/02/21/jquery-and-rails-3/ | |
# $RAILS_ROOT/config/initalizers/jquery.rb | |
if ActionView::Helpers::AssetTagHelper.const_defined?(:JAVASCRIPT_DEFAULT_SOURCES) | |
ActionView::Helpers::AssetTagHelper.send(:remove_const, "JAVASCRIPT_DEFAULT_SOURCES") | |
end | |
ActionView::Helpers::AssetTagHelper::JAVASCRIPT_DEFAULT_SOURCES = ['jquery', 'rails'] | |
ActionView::Helpers::AssetTagHelper::reset_javascript_include_default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment