Module: Trollo::Troller::ClassMethods

Defined in:
lib/trollo/troller.rb

Instance Method Summary collapse

Instance Method Details

#named(name) ⇒ Object



29
30
31
# File 'lib/trollo/troller.rb', line 29

def named(name)
  where(name: name).first
end

#trolling(trollable) ⇒ Object



25
26
27
# File 'lib/trollo/troller.rb', line 25

def trolling(trollable)
  where(trollable_type: trollable.class.name, trollable_id: trollable.id)
end