]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_blocks_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / user_blocks_controller.rb
index d5820568e45c8b1094a0137729d78ecb19a825d5..c41501367e0896abdd52a7d2a93edf7a7ffbc243 100644 (file)
@@ -60,7 +60,7 @@ class UserBlocksController < ApplicationController
       if @user_block.creator != current_user
         flash[:error] = t("user_block.update.only_creator_can_edit")
         redirect_to :action => "edit"
       if @user_block.creator != current_user
         flash[:error] = t("user_block.update.only_creator_can_edit")
         redirect_to :action => "edit"
-      elsif @user_block.update_attributes(
+      elsif @user_block.update(
         :ends_at => Time.now.getutc + @block_period.hours,
         :reason => params[:user_block][:reason],
         :needs_view => params[:user_block][:needs_view]
         :ends_at => Time.now.getutc + @block_period.hours,
         :reason => params[:user_block][:reason],
         :needs_view => params[:user_block][:needs_view]