Skip to content
Snippets Groups Projects
Commit 84735186 authored by Alex Braha Stoll's avatar Alex Braha Stoll
Browse files

Add WikiPage#to_partial_path

parent c8a1e968
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment