summaryrefslogtreecommitdiff
path: root/app/models/tree.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-08-11 11:59:36 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2014-08-11 11:59:36 +0200
commitd7701a263f71d48ba284ad325fd7c5a48742fe7d (patch)
tree40641bec1659a8025ea2e2532f76e48f5261bdc6 /app/models/tree.rb
parent99eb283101108f1f95e95ade8c1352f547578b26 (diff)
downloadgitlab-ce-d7701a263f71d48ba284ad325fd7c5a48742fe7d.tar.gz
Move calls to Gitlab::MarkdownHelper to application_helper
Diffstat (limited to 'app/models/tree.rb')
-rw-r--r--app/models/tree.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/tree.rb b/app/models/tree.rb
index 5bb1f3cdaf4..07c9a825e24 100644
--- a/app/models/tree.rb
+++ b/app/models/tree.rb
@@ -1,4 +1,6 @@
class Tree
+ include Gitlab::MarkdownHelper
+
attr_accessor :entries, :readme, :contribution_guide
def initialize(repository, sha, path = '/')
@@ -13,8 +15,7 @@ class Tree
# by markup renderer.
if available_readmes.length > 1
supported_readmes = available_readmes.select do |readme|
- Gitlab::MarkdownHelper.gitlab_markdown?(readme.name) ||
- Gitlab::MarkdownHelper.markup?(readme.name)
+ gitlab_markdown?(readme.name) || markup?(readme.name)
end
# Take the first supported readme, or the first available readme, if we