tree.readme method added
This commit is contained in:
parent
453b2ae68b
commit
76e1ca6430
2 changed files with 6 additions and 2 deletions
|
@ -28,4 +28,8 @@ class TreeDecorator < ApplicationDecorator
|
|||
file = File.join(path, "..")
|
||||
h.project_tree_path(project, h.tree_join(ref, file))
|
||||
end
|
||||
|
||||
def readme
|
||||
@readme ||= contents.find { |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue