From 29d50b99593db6f9a46eaec5fd7c5ab85a09f382 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Thu, 16 May 2013 17:26:29 +0400 Subject: [PATCH] #34: refactoring of Project#git_project_address method --- app/models/project.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index b9794aee1..2990eb472 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -138,7 +138,7 @@ class Project < ActiveRecord::Base owner == user end - def git_project_address auth_user + def git_project_address(auth_user = nil) host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host] protocol = APP_CONFIG['mailer_https_url'] ? "https" : "http" rescue "http" opts = {:host => host, :protocol => protocol} @@ -243,7 +243,7 @@ class Project < ActiveRecord::Base end def html_url - git_project_address(nil).gsub(/.git$/, '') + git_project_address.gsub(/.git$/, '') end protected