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

Return the object added to cart #26

Closed
deivinsontejeda opened this issue Sep 12, 2014 · 2 comments
Closed

Return the object added to cart #26

deivinsontejeda opened this issue Sep 12, 2014 · 2 comments

Comments

@deivinsontejeda
Copy link

In some cases in useful get the last object added to Cart.

For example

item = @shopping_cart.add(obj)

Add the code to support previous is quite easy. Maybe you should ask why return the last object? I was working on an app where I need get this object due to the UI expected another action with this one.

@dabit
Copy link
Contributor

dabit commented Sep 26, 2014

Merged! Thanks a lot.

@dabit dabit closed this as completed Sep 26, 2014
@deivinsontejeda
Copy link
Author

Awesome!

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

2 participants