class Filterameter::Exceptions::CannotDetermineModelError
Cannot Determine Model Error¶ ↑
Class CannotDetermineModelError
is raised when the model class cannot be determined from either the controller name or controller path. This is a setup issue; the resolution is for the controller to specify the model class explicitly by adding a call to `filter_model`.
Public Class Methods
new(name, path)
click to toggle source
Calls superclass method
# File lib/filterameter/exceptions/cannot_determine_model_error.rb, line 11 def initialize(name, path) super "Cannot determine model name from controller name #{value_and_classify(name)} " \ "or path #{value_and_classify(path)}. Declare the model explicitly with filter_model." end
Private Instance Methods
value_and_classify(value)
click to toggle source
# File lib/filterameter/exceptions/cannot_determine_model_error.rb, line 18 def value_and_classify(value) "(#{value} => #{value.classify})" rescue StandardError value end