Module: Detour::Flaggable::ClassMethods

Defined in:
lib/detour/flaggable.rb

Instance Method Summary collapse

Instance Method Details

#flaggable_find!(value) ⇒ Object

Finds a record by the field set by the :find_by param in ‘acts_as_flaggable`. If no :find_by param was provided, :id is used.

Parameters:

  • value (String, Integer)

    The value to find the record by.



7
8
9
# File 'lib/detour/flaggable.rb', line 7

def flaggable_find!(value)
  send("find_by_#{@detour_flaggable_find_by}!", value)
end