Exception: AbstractController::Helpers::ClassMethods::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.



149
150
151
152
153
154
155
156
157
158
159
# File 'lib/abstract_controller/helpers.rb', line 149

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