summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/wiki_page.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index c4da80ff9..e1765a20d 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -155,11 +155,7 @@ class WikiPage < ActiveRecord::Base
end
def content_for_version(version=nil)
- if content
- result = content.versions.find_by_version(version.to_i) if version
- result ||= content
- result
- end
+ (content && version) ? content.versions.find_by_version(version.to_i) : content
end
def diff(version_to=nil, version_from=nil)