Exception: AbstractController::Helpers::MissingHelperError

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

Instance Method Summary collapse

Methods inherited from LoadError

#is_missing?

Methods inherited from Exception

#as_json

Constructor Details

#initialize(error, path) ⇒ MissingHelperError


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

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

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