aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/clean_ups_controller.rb10
-rw-r--r--app/controllers/concerns/metadata_controller_support.rb2
2 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/clean_ups_controller.rb b/app/controllers/clean_ups_controller.rb
index ec28aa0fc..c25df1a00 100644
--- a/app/controllers/clean_ups_controller.rb
+++ b/app/controllers/clean_ups_controller.rb
@@ -4,12 +4,12 @@ class CleanUpsController < ChouetteController
belongs_to :referential
def create
- clean_up = CleanUp.new(clean_up_params)
- clean_up.referential = @referential
- if clean_up.valid?
- clean_up.save
+ @clean_up = CleanUp.new(clean_up_params)
+ @clean_up.referential = @referential
+ if @clean_up.valid?
+ @clean_up.save
else
- flash[:alert] = clean_up.errors.full_messages.join("<br/>")
+ flash[:alert] = @clean_up.errors.full_messages.join("<br/>")
end
redirect_to referential_path(@referential)
end
diff --git a/app/controllers/concerns/metadata_controller_support.rb b/app/controllers/concerns/metadata_controller_support.rb
index fc7c9c3df..4dcbfe5d0 100644
--- a/app/controllers/concerns/metadata_controller_support.rb
+++ b/app/controllers/concerns/metadata_controller_support.rb
@@ -2,7 +2,7 @@ module MetadataControllerSupport
extend ActiveSupport::Concern
included do
- after_action :set_creator_metadata, only: :create, unless: Proc.new {|c| c.is_a? CleanUpsController }
+ after_action :set_creator_metadata, only: :create
after_action :set_modifier_metadata, only: :update
end