X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3d55db46ed24d563d82cf42f91fd064e40447c4d..82cf356d85154057f840c1b3b413f49a65599690:/app/models/user_block.rb?ds=sidebyside diff --git a/app/models/user_block.rb b/app/models/user_block.rb index f8c05c92c..7bf8f86b5 100644 --- a/app/models/user_block.rb +++ b/app/models/user_block.rb @@ -18,9 +18,11 @@ class UserBlock < ActiveRecord::Base # revokes the block, allowing the user to use the API again. the argument # is the user object who is revoking the ban. def revoke!(revoker) - update_attributes({ :ends_at => Time.now.getutc(), - :revoker_id => revoker.id, - :needs_view => false }) + update_attributes({ + :ends_at => Time.now.getutc(), + :revoker_id => revoker.id, + :needs_view => false + }, :without_protection => true) end private