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

ProductsController decorator should be updated/removed #33

Closed
newijk opened this issue Nov 8, 2012 · 2 comments
Closed

ProductsController decorator should be updated/removed #33

newijk opened this issue Nov 8, 2012 · 2 comments

Comments

@newijk
Copy link

newijk commented Nov 8, 2012

Spree_auth_devise currently decorates the Spree::ProductsController in a way that breaks the expected behavoir. The decorator does not use the active scope like the original method but instead it basically reimplements the active scope (not DRY). This causes unexpected behavoir when changing the products that the active scope returns (ie decorating it).

Additionally, there appears to be no difference in results between either version of the load_products method: in both cases 404 is returned when the product does not exist or the user is not allowed to see the product.

Imho the method should be either updated to use the active scope or removed entirely.

@radar
Copy link
Contributor

radar commented Nov 11, 2012

You're right. I'll remove this now.

@radar radar closed this as completed in 7f8daab Nov 11, 2012
radar added a commit that referenced this issue Nov 11, 2012
This is basically reimplementing the same functionality that the real ProductsController has.

Fixes #33
radar added a commit that referenced this issue Nov 11, 2012
This is basically reimplementing the same functionality that the real ProductsController has.

Fixes #33
@radar
Copy link
Contributor

radar commented Nov 11, 2012

Fixed in all branches. Thank you.

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