diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-17 12:28:50 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-18 16:08:26 +0300 |
commit | 88f9ed3d196776295294d540556216b95d0bcd60 (patch) | |
tree | 385473ef3d9f6283ee8ed2639766f1722c13c298 /app/models/tree.rb | |
parent | dbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff) |
Move finding of contributing file from tree to repository.
Diffstat (limited to 'app/models/tree.rb')
-rw-r--r-- | app/models/tree.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/tree.rb b/app/models/tree.rb index 4f5d81f0a5e..9095fb134ff 100644 --- a/app/models/tree.rb +++ b/app/models/tree.rb @@ -1,7 +1,7 @@ class Tree include Gitlab::MarkdownHelper - attr_accessor :entries, :readme, :contribution_guide + attr_accessor :entries, :readme def initialize(repository, sha, path = '/') path = '/' if path.blank? @@ -28,11 +28,6 @@ class Tree readme_path = path == '/' ? readme_tree.name : File.join(path, readme_tree.name) @readme = Gitlab::Git::Blob.find(git_repo, sha, readme_path) end - - if contribution_tree = @entries.find(&:contributing?) - contribution_path = path == '/' ? contribution_tree.name : File.join(path, contribution_tree.name) - @contribution_guide = Gitlab::Git::Blob.find(git_repo, sha, contribution_path) - end end def trees |