X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7d8cf94680a369b694a27a2657ffb097bc772511..1340fca8f17e4e3cce211e6eafed18cde7f57386:/app/models/user_block.rb 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