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

Fix for #2033 - fix the collection_path for 'delete' batch action #2034

Conversation

tinynumbers
Copy link
Contributor

Fix for issue #2033 - modify the default "delete" batch action to redirect to the collection path via route_collection_path to ensure that the path will work for nested (belongs_to) resources.

…tion to redirect to the collection path via route_collection_path to ensure that the path will work for nested (belongs_to) resources.
…s the selected rows.

* Corrected the tests in the 'Use default (destroy) batch action' scenario in the batch_actions feature.
@seanlinsley
Copy link
Contributor

@tinynumbers did you pinpoint what the problem is with collection_path? As I said before, we really should be relying on the helpers that Inherited Resources gives us.

@tinynumbers
Copy link
Contributor Author

@daxter - Take a look at my comments on #2033 (comment) - I believe this is actually a bug in Inherited Resources (specifically when used with Rails >= 3.2.5), but this pull request will work around that issue until it gets fixed on the Inherited Resources side.

@seanlinsley
Copy link
Contributor

Okay, merging this in. Thanks for the contribution ❤️

seanlinsley added a commit that referenced this pull request Apr 2, 2013
…n-redirect

Fix for #2033 - fix the collection_path for 'delete' batch action
@seanlinsley seanlinsley merged commit 6f983eb into activeadmin:master Apr 2, 2013
@seanlinsley seanlinsley mentioned this pull request Apr 11, 2013
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

Successfully merging this pull request may close these issues.

2 participants