Module: Trollo::Troller::InstanceMethods

Defined in:
lib/trollo/troller.rb

Instance Method Summary collapse

Instance Method Details

#trollableObject



12
13
14
# File 'lib/trollo/troller.rb', line 12

def trollable
  trollable_type.constantize.find(trollable_id)
end

#trollable=(thing) ⇒ Object



16
17
18
19
# File 'lib/trollo/troller.rb', line 16

def trollable=(thing)
  self.trollable_type = thing.class.name
  self.trollable_id = thing.id
end