aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlban Peignier2015-05-21 11:53:46 +0200
committerAlban Peignier2015-05-21 11:53:46 +0200
commitf77f97682897b80b29b290d338d14fec1252f36f (patch)
treec342830ad6dc1469a86a9523f831744774c20e75 /app
parent3b53857b924cb620fe8569109258e7f2cecba68f (diff)
downloadchouette-core-f77f97682897b80b29b290d338d14fec1252f36f.tar.bz2
Include properly CleanUp error message in i18n message
Diffstat (limited to 'app')
-rw-r--r--app/controllers/clean_ups_controller.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/clean_ups_controller.rb b/app/controllers/clean_ups_controller.rb
index fde015efd..6c0df0830 100644
--- a/app/controllers/clean_ups_controller.rb
+++ b/app/controllers/clean_ups_controller.rb
@@ -1,22 +1,22 @@
class CleanUpsController < ChouetteController
respond_to :html, :only => [:create]
- belongs_to :referential
+ belongs_to :referential
def create
- clean_up = CleanUp.new( params[:clean_up])
+ clean_up = CleanUp.new(params[:clean_up])
+
if clean_up.invalid?
flash[:alert] = clean_up.errors.full_messages.join("<br/>")
else
begin
result = clean_up.clean
flash[:notice] = result.notice.join("<br/>")
- rescue
- flash[:alert] = t('clean_ups.failure') + $!
+ rescue => e
+ flash[:alert] = t('clean_ups.failure', error_message: e.to_s)
end
end
redirect_to referential_path(@referential)
-
end
-
+
end