Exception: AbstractController::Helpers::MissingHelperError

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

Instance Method Summary collapse

Constructor Details

#initialize(error, path) ⇒ MissingHelperError

Returns a new instance of MissingHelperError.



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/abstract_controller/helpers.rb', line 26

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