Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return to the edit mapping page after save
* Update messaging on create to give feedback about type or mapping, the canonicalised path and the redirect location if appropriate * Redirect back to mapping edit screen so user can quickly confirm their changes or fix mistakes
- Loading branch information
Paul Hayes
committed
Nov 20, 2013
1 parent
9145a6a
commit 0106e19
Showing
4 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I wouldn't normally expect to see a call to
ActionController::Base.helpers.link_to
in here - that would be more of a view concern. However,flash[:notice]
overlaps a bit because you're having to set it in the controller. I think you can avoid the ugliness of theActionController::Base
reference by usingview_context.link_to
instead. If you're going to do that, I think you can move the wholeif @mapping.redirect?
block toMappingsHelper#created_notice
, and just sayredirect_to edit_site_mapping_path(@site, @mapping), notice: view_context.created_notice(@mapping)