This project is archived and is in readonly mode.
Modules including ActionView::Helpers fail to load due to JavaScript vs Javascript typo
Reported by Tom Ward | May 22nd, 2009 @ 01:36 PM | in 2.x
If I define a module:
module FailsToLoad
include ActionView::Helpers
end
It will fail to load with the error message:
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant':NameError: uninitialized constant FailsToLoad::JavascriptHelper
This is cause by the line:
autoload :JavascriptHelper, 'action_view/helpers/javascript_helper'
should be:
autoload :JavaScriptHelper, 'action_view/helpers/javascript_helper'
as the file action_view/helpers/javascript_helper defines ActionView::Helpers::JavaScriptHelper (note capitalisation).
Comments and changes to this ticket
-
Tom Ward May 22nd, 2009 @ 01:42 PM
Attaching patch. Any suggestions as to how to write a test would be much appreciated.
-
Tom Ward May 22nd, 2009 @ 03:33 PM
New patch which fixes typo and removes explicit require that was masking the original bug.
-
Tom Ward May 22nd, 2009 @ 10:36 PM
- Tag changed from actionview, dependencies, typo to actionview, dependencies, patch, typo
-
James Andrews May 24th, 2009 @ 02:14 PM
- Tag changed from actionview, dependencies, patch, typo to actionview, dependencies, typo
+1 Looks good.
-
James Andrews May 24th, 2009 @ 02:15 PM
- Tag changed from actionview, dependencies, typo to actionview, dependencies, patch, typo
-
Tom Ward May 26th, 2009 @ 08:52 AM
- Tag changed from actionview, dependencies, patch, typo to actionview, dependencies, patch, typo, verified
Adding verified tag, as it now has 3 +1s
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>