Commit 84735186 authored by Alex Braha Stoll's avatar Alex Braha Stoll

Add WikiPage#to_partial_path

parent c8a1e968
......@@ -207,6 +207,12 @@ class WikiPage
end
end
# Relative path to the partial to be used when rendering collections
# of this object.
def to_partial_path
'projects/wikis/wiki_page'
end
private
def set_attributes
......
......@@ -322,6 +322,14 @@ describe WikiPage, models: true do
end
end
describe '#to_partial_path' do
it 'returns the relative path to the partial to be used' do
page = build(:wiki_page)
expect(page.to_partial_path).to eq('projects/wikis/wiki_page')
end
end
private
def remove_temp_repo(path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment