diff options
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 4d8cfd6368f..76f311ed0b4 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -61,12 +61,16 @@ class WikiPage # The raw content of this page. def content - @attributes[:content] + @attributes[:content] ||= if @page + @page.raw_data + end end # The processed/formatted content of this page. def formatted_content - @attributes[:formatted_content] + @attributes[:formatted_content] ||= if @page + @page.formatted_data + end end # The markup format for the page. @@ -167,8 +171,6 @@ class WikiPage def set_attributes attributes[:slug] = @page.escaped_url_path attributes[:title] = @page.title - attributes[:content] = @page.raw_data - attributes[:formatted_content] = @page.formatted_data attributes[:format] = @page.format end |