aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/clean_ups_controller.rb10
-rw-r--r--db/migrate/20180420073801_fix_typo_in_cleanup_results.rb5
2 files changed, 10 insertions, 5 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/db/migrate/20180420073801_fix_typo_in_cleanup_results.rb b/db/migrate/20180420073801_fix_typo_in_cleanup_results.rb
new file mode 100644
index 000000000..2e616d3e1
--- /dev/null
+++ b/db/migrate/20180420073801_fix_typo_in_cleanup_results.rb
@@ -0,0 +1,5 @@
+class FixTypoInCleanupResults < ActiveRecord::Migration
+ def change
+ rename_column :clean_up_results, :message_attributs, :message_attributes
+ end
+end