rosa-build/app/helpers/projects_helper.rb

10 lines
255 B
Ruby
Raw Normal View History

2011-03-10 11:35:46 +00:00
module ProjectsHelper
def git_repo_url(name, read_only = true)
if current_user and !read_only
"http://#{current_user.uname}@#{request.host_with_port}/#{name}.git"
else
"http://#{request.host_with_port}/#{name}.git"
end
end
2011-03-10 11:35:46 +00:00
end