I am not able to run the up-migration. copy-pasted the source,so the problem is not there…
I use rails 3.2.3, think its due to the version.
== CombineItemsInCart: migrating ============================================= rake aborted! An error has occurred, this and all later migrations canceled:
Can’t mass-assign protected attributes: quantity
I added :quantity to attr_accessible of LineItem
=> now it works!
class LineItem < ActiveRecord::Base attr_accessible :cart_id, :product_id, :quantity belongs_to :product belongs_to :cart end