Module: Detour::Flaggable::ClassMethods
- Defined in:
- lib/detour/flaggable.rb
Instance Method Summary collapse
-
#flaggable_find!(value) ⇒ Object
Finds a record by the field set by the :find_by param in ‘acts_as_flaggable`.
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.
7 8 9 |
# File 'lib/detour/flaggable.rb', line 7 def flaggable_find!(value) send("find_by_#{@detour_flaggable_find_by}!", value) end |