Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
ensure
methods re-usable across actions
Previously these were only used on edit actions which was fine because the `render_edit_with_errors` method is able to accommodate both the `update_amount` and `invalidate` actions. However, I want to re-use the `ensure_amount` method inside of the new/create flow. Since new/create flow would need to render a different template (eg. `render_new_with_errors`) I have altered the ensure method to accept a block instead of being hard-coded to `render_edit_with_errors`.
- Loading branch information