This project is archived and is in readonly mode.

#2697 ✓resolved
Tom Ward

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

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>

People watching this ticket

Attachments

Pages