X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cea7d44d791a0868f8636942b6f07a1cbcfe19e8..8c32e6349281dc041af55d3b493fdeac85212b02:/app/controllers/user_blocks_controller.rb?ds=sidebyside diff --git a/app/controllers/user_blocks_controller.rb b/app/controllers/user_blocks_controller.rb index 546c8233c..885318cbe 100644 --- a/app/controllers/user_blocks_controller.rb +++ b/app/controllers/user_blocks_controller.rb @@ -39,11 +39,13 @@ class UserBlocksController < ApplicationController def create if @valid_params + now = Time.now.utc @user_block = UserBlock.new( :user => @user, :creator => current_user, :reason => params[:user_block][:reason], - :ends_at => Time.now.utc + @block_period.hours, + :created_at => now, + :ends_at => now + @block_period.hours, :needs_view => params[:user_block][:needs_view] )