Module: Clot::ActiveRecord::Droppable
- Defined in:
- lib/clot/active_record/droppable.rb
Instance Method Summary collapse
Instance Method Details
#get_drop_class(class_obj) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/clot/active_record/droppable.rb', line 5 def get_drop_class(class_obj) begin drop_string = class_obj.to_s + "Drop" drop_class = drop_string.constantize drop_class rescue get_drop_class class_obj.superclass end end |
#to_liquid ⇒ Object
15 16 17 18 |
# File 'lib/clot/active_record/droppable.rb', line 15 def to_liquid drop_class = get_drop_class self.class drop_class.new self end |