Sha256: 20c5c1fd07d795dabef7909a28ef90b577de2599b4c3c758f09e35fd2ace5c6d
Contents?: true
Size: 377 Bytes
Versions: 1
Compression:
Stored size: 377 Bytes
Contents
module Spree class AssembliesPart < ActiveRecord::Base belongs_to :assembly, :class_name => "Spree::Product", :foreign_key => "assembly_id", touch: true belongs_to :part, :class_name => "Spree::Variant", :foreign_key => "part_id" def self.get(assembly_id, part_id) find_or_initialize_by(assembly_id: assembly_id, part_id: part_id) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_product_assembly-1.0.0 | app/models/spree/assemblies_part.rb |