Module: Itemable::ActsAsItemable::BelongsToItems::ClassMethods
- Defined in:
- lib/itemable/acts_as_itemable.rb
Instance Method Summary collapse
Instance Method Details
#belongs_to_items(association_name, options = {}) ⇒ Object
78 79 80 81 82 83 84 85 |
# File 'lib/itemable/acts_as_itemable.rb', line 78 def belongs_to_items(association_name, ={}) = { through: :item_parents, source: :parent, source_type: association_name.to_s.classify } has_many association_name, .merge(.symbolize_keys) end |