Exception: AbstractController::Helpers::MissingHelperError

Inherits:
LoadError
  • Object
show all
Defined in:
actionpack/lib/abstract_controller/helpers.rb

Constant Summary

Constants inherited from LoadError

LoadError::REGEXPS

Instance Method Summary collapse

Methods inherited from LoadError

#is_missing?, #path

Constructor Details

#initialize(error, path) ⇒ MissingHelperError

Returns a new instance of MissingHelperError.



16
17
18
19
20
21
22
23
24
25
26
# File 'actionpack/lib/abstract_controller/helpers.rb', line 16

def initialize(error, path)
  @error = error
  @path  = "helpers/#{path}.rb"
  set_backtrace error.backtrace

  if error.path =~ /^#{path}(\.rb)?$/
    super("Missing helper file helpers/%s.rb" % path)
  else
    raise error
  end
end