Module: Pacecar::Polymorph::ClassMethods
- Defined in:
- lib/pacecar/polymorph.rb
Instance Method Summary collapse
Instance Method Details
#has_polymorph(name) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/pacecar/polymorph.rb', line 9 def has_polymorph(name) scope "for_#{name}_type", ->(type) { polymorph_type = "#{name}_type" where(polymorph_type => type) } end |