From 0ac844bde0ee251463e4eae7691906c39445767d Mon Sep 17 00:00:00 2001
From: Zog
Date: Fri, 20 Apr 2018 09:41:42 +0200
Subject: Refs #6630; Fix CleanUps Controller
Fix cleanups in the process
---
app/controllers/clean_ups_controller.rb | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'app/controllers/clean_ups_controller.rb')
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("
")
+ flash[:alert] = @clean_up.errors.full_messages.join("
")
end
redirect_to referential_path(@referential)
end
--
cgit v1.2.3