Class: ActionLink::Model

Inherits:
Object
  • Object
show all
Includes:
Calls
Defined in:
lib/action_link/model.rb

Overview

Extracts a model from the provided model options.

Instance Method Summary collapse

Instance Method Details

#callObject



11
12
13
14
15
16
# File 'lib/action_link/model.rb', line 11

def call
  model.respond_to?(:model_name) ||
    raise(MissingModelError, "Model `#{model.inspect}` must respond to #model_name")

  model
end