Created
June 28, 2012 18:30
-
-
Save jcoyne/3013094 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class SomethingController | |
def update | |
... | |
if (obj.save) | |
update_success(obj) | |
else | |
update_failure(obj) | |
end | |
end | |
def update_success(obj) | |
redirect_to something_path | |
end | |
def update_failure(obj) | |
redirect_to edit_something_path(obj) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment