Open imsinu9 opened 8 years ago
def item_for(object) shopping_cart_items.where(:item => object).first end
This returns parent object and if child object is passed as object it returns nil which makes remove call not to execute.
I have to override this method in my model which act like Shopping Cart.
This returns parent object and if child object is passed as object it returns nil which makes remove call not to execute.
To work with STI
I have to override this method in my model which act like Shopping Cart.