Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add attr_accessible for rails 3.2.3 and spree 1.1

  • Loading branch information...
commit 81f4238fd9ce5601477f865feb1f7fc03977b4f9 1 parent 9f1546e
@ehoch authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 app/models/spree/product_decorator.rb
View
4 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]
Please sign in to comment.
Something went wrong with that request. Please try again.