diff options
Diffstat (limited to 'app/controllers/assets_controller.rb')
| -rw-r--r-- | app/controllers/assets_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index 988d56d1..03780c69 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb | |||
| @@ -93,6 +93,12 @@ class AssetsController < ApplicationController | |||
| 93 | format.html { redirect_to(assets_url) } | 93 | format.html { redirect_to(assets_url) } |
| 94 | format.xml { head :ok } | 94 | format.xml { head :ok } |
| 95 | end | 95 | end |
| 96 | rescue ActiveRecord::RecordInvalid => e | ||
| 97 | flash[:error] = e.message | ||
| 98 | respond_to do |format| | ||
| 99 | format.html { redirect_to(asset_path(@asset)) } | ||
| 100 | format.xml { head :forbidden } | ||
| 101 | end | ||
| 96 | end | 102 | end |
| 97 | 103 | ||
| 98 | private | 104 | private |
