Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Its now working with STI as item_for search for Parent class #44

Open
1 task
imsinu9 opened this issue Aug 14, 2016 · 0 comments
Open
1 task

Its now working with STI as item_for search for Parent class #44

imsinu9 opened this issue Aug 14, 2016 · 0 comments

Comments

@imsinu9
Copy link

imsinu9 commented Aug 14, 2016

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.

To work with STI

I have to override this method in my model which act like Shopping Cart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant