Permalink
Browse files

Add attr_accessible for rails 3.2.3 and spree 1.1

  • Loading branch information...
1 parent 9f1546e commit 81f4238fd9ce5601477f865feb1f7fc03977b4f9 @ehoch committed Apr 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/models/spree/product_decorator.rb
@@ -1,5 +1,5 @@
Spree::Product.class_eval do
-
+
has_and_belongs_to_many :assemblies, :class_name => "Spree::Product",
:join_table => "spree_assemblies_parts",
:foreign_key => "part_id", :association_foreign_key => "assembly_id"
@@ -15,6 +15,8 @@
not_deleted.individual_saled.available(args.first)
}
+ attr_accessible :can_be_part, :individual_sale
+
# returns the number of inventory units "on_hand" for this product
def on_hand_with_assembly(reload = false)
if self.assembly? && Spree::Config[:track_inventory_levels]

0 comments on commit 81f4238

Please sign in to comment.