From 73dc8b10fdd20575069d22c6b44ce9bbc64de110 Mon Sep 17 00:00:00 2001 From: Oleg Valter <o.a.philippov@gmail.com> Date: Thu, 30 Jan 2025 08:51:12 +0300 Subject: [PATCH] removed no longer needed ensure_protocol --- app/controllers/users_controller.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 89eb83644..34e7e7e29 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -366,18 +366,6 @@ class UsersController < ApplicationController end end - # Ensure that a "naked" URL like example.com gets a protocol. - def ensure_protocol(uri) - # URI::Generic indicates the user didn't include a protocol - if URI.parse(uri).instance_of?(URI::Generic) - "https://#{uri}" - else - uri - end - rescue URI::InvalidURIError - nil - end - def update_profile profile_params = params.require(:user).permit(:username, :profile_markdown, -- GitLab