-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[1930] Allow IR shorthand for redirection #2001
[1930] Allow IR shorthand for redirection #2001
Conversation
@@ -22,7 +22,6 @@ | |||
Then /^I should download a CSV file with "([^"]*)" separator for "([^"]*)" containing:$/ do |sep, resource_name, table| | |||
page.response_headers['Content-Type'].should == 'text/csv; charset=utf-8' | |||
csv_filename = "#{resource_name}-#{Time.now.strftime("%Y-%m-%d")}.csv" | |||
page.response_headers['Content-Disposition'].should == %{attachment; filename="#{csv_filename}"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is the only thing people might have a bone of contention over. Is there a browser that needs this?
Hmm. So this code is still needed by Rails 3.0. I propose no longer supporting 3.0 🙉 🙈 🙊 |
The overrides to the IR controller are still required. If we would like to support the shorthand, we need to implement something similar to this: EddM@72b78c0 I'm going to close this PR for now. If @EddM would like to create a PR for the commit, we could do some refactoring and support this feature. |
The overrides are only required for Rails 3.0. Hence why I had set the milestone to be the next big release. Now, this seems like something to go in 0.7.0. |
@gregbell should this really be closed? |
Good point. Yes, I think this can stay open and be assigned to 0.7.0. I'm love seeing code deleted! :) |
Now the shorthand syntax works: ```ruby controller do # Redirects to index page instead of rendering udpated resource def update update!{ collection_path } end end ```
[1930] Allow IR shorthand for redirection
finally :] |
Just saw this ... 7 years later. Solved a nagging and persistent problem with all of my AA sites. It would be AWESOME to see this in the documentation on http://activeadmin.info ! |
We're very happy to take a PR documenting this :) |
For #1930; supersedes #1944
This removes the Inherited Resources overrides we had. Now the shorthand syntax works: