redirect_to :action => "edit"
else
user_block_was_active = @user_block.active?
@user_block.reason = params[:user_block][:reason]
@user_block.needs_view = params[:user_block][:needs_view]
@user_block.ends_at = Time.now.utc + @block_period.hours
redirect_to :action => "edit"
else
user_block_was_active = @user_block.active?
@user_block.reason = params[:user_block][:reason]
@user_block.needs_view = params[:user_block][:needs_view]
@user_block.ends_at = Time.now.utc + @block_period.hours