end
def show
- if current_user && current_user == @user_block.user
+ if current_user && current_user == @user_block.user && !@user_block.deactivates_at
@user_block.needs_view = false
@user_block.deactivates_at = [@user_block.ends_at, Time.now.utc].max
@user_block.save!
render :action => "new"
end
else
- redirect_to new_user_block_path(:display_name => params[:display_name])
+ redirect_to new_user_block_path(params[:display_name])
end
end
end
end
else
- redirect_to edit_user_block_path(:id => params[:id])
+ redirect_to edit_user_block_path(params[:id])
end
end