Use only new hash syntax

This commit is contained in:
Artem Chernikov 2014-07-21 14:49:05 +02:00
parent 3901973fd6
commit 5289f41eb5
72 changed files with 179 additions and 181 deletions

View file

@ -12,18 +12,18 @@ class Admin::DifficultyLevelsController < ApplicationController
@conference.use_difficulty_levels = false
@conference.save!
flash[:error] = "You cannot enable the usage of difficulty levels without having set any levels."
redirect_to(admin_conference_difficulty_levels_path(:conference_id => @conference.short_title))
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
rescue ActiveRecord::RecordInvalid
flash[:error] = "Something went wrong. Difficulty Levels update failed."
redirect_to(admin_conference_difficulty_levels_path(:conference_id => @conference.short_title))
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
end
else
flash[:notice] = "Difficulty Levels were successfully updated."
redirect_to(admin_conference_difficulty_levels_path(:conference_id => @conference.short_title))
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
end
else
flash[:error] = "Difficulty Levels update failed."
redirect_to(admin_conference_difficulty_levels_path(:conference_id => @conference.short_title))
redirect_to(admin_conference_difficulty_levels_path(conference_id: @conference.short_title))
end
end
end