Module: Itemable::ActsAsItemable::BelongsToItem::ClassMethods
- Defined in:
- lib/itemable/acts_as_itemable.rb
Instance Method Summary collapse
Instance Method Details
#belongs_to_item(association_name, options = {}) ⇒ Object
92 93 94 95 96 97 98 99 |
# File 'lib/itemable/acts_as_itemable.rb', line 92 def belongs_to_item(association_name, ={}) = { through: :item_parent, source: :parent, source_type: association_name.to_s.classify } has_one association_name, .merge(.symbolize_keys) end |