Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Modules including ActionView::Helpers fail to load due to JavaScript vs Javascript typo

#2697

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).

Reported by Tom Ward · May 22nd, 2009 @ 01:36 PM

State: resolved
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Tom Ward
    Tom Ward

    Attaching patch. Any suggestions as to how to write a test would be much appreciated.

    May 22nd, 2009 @ 01:42 PM

  2. James Adam
    James Adam

    Seems like a no-brainer. +1

    May 22nd, 2009 @ 01:51 PM

  3. Tom Ward
    Tom Ward

    New patch which fixes typo and removes explicit require that was masking the original bug.

    May 22nd, 2009 @ 03:33 PM

  4. James Mead
    James Mead

    Makes sense to me. +1

    May 22nd, 2009 @ 03:49 PM

  5. Tom Ward
    Tom Ward
    • Tag changed from actionview, dependencies, typo to actionview, dependencies, patch, typo

    May 22nd, 2009 @ 10:36 PM

  6. James Andrews
    James Andrews
    • Tag changed from actionview, dependencies, patch, typo to actionview, dependencies, typo

    +1 Looks good.

    May 24th, 2009 @ 02:14 PM

  7. James Andrews
    James Andrews
    • Tag changed from actionview, dependencies, typo to actionview, dependencies, patch, typo

    May 24th, 2009 @ 02:15 PM

  8. Tom Ward
    Tom Ward
    • Tag changed from actionview, dependencies, patch, typo to actionview, dependencies, patch, typo, verified

    Adding verified tag, as it now has 3 +1s

    May 26th, 2009 @ 08:52 AM

  9. Michael Koziarski
    Michael Koziarski
    • State changed from new to resolved

    pulled in

    June 9th, 2009 @ 09:12 AM

  10. Tom Ward
    Tom Ward

    Thanks Michael. Much appreciated.

    June 9th, 2009 @ 09:17 AM