Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Created June 28, 2012 18:30
Show Gist options
  • Save jcoyne/3013094 to your computer and use it in GitHub Desktop.
Save jcoyne/3013094 to your computer and use it in GitHub Desktop.
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