Module: Behaveable::ResourceFinder

Defined in:
lib/behaveable/resource_finder.rb

Instance Method Summary collapse

Instance Method Details

#behaveableObject

Get the behaveable object.

Returns

  • ActiveRecord::Model - Behaveable instance object.



8
9
10
11
# File 'lib/behaveable/resource_finder.rb', line 8

def behaveable
  klass, param = behaveable_class
  klass.find(params[param.to_sym]) if klass
end