Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment