summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 35c873830a7..0e727664d39 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -894,6 +894,13 @@ class Project < ActiveRecord::Base
Gitlab::Routing.url_helpers.project_url(self)
end
+ def readme_url
+ readme = repository.readme
+ if readme
+ Gitlab::Routing.url_helpers.project_blob_url(self, File.join(default_branch, readme.path))
+ end
+ end
+
def new_issuable_address(author, address_type)
return unless Gitlab::IncomingEmail.supports_issue_creation? && author