#34: refactoring of Project#git_project_address method

This commit is contained in:
Vokhmin Alexey V 2013-05-16 17:26:29 +04:00
parent edb07417d8
commit 29d50b9959
1 changed files with 2 additions and 2 deletions

View File

@ -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