summaryrefslogtreecommitdiffstats
path: root/app/models/wiki_content.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-09-28 18:39:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-09-28 18:39:07 +0000
commit2d78003c87099fb6a832025027701e9456727727 (patch)
tree555f64d08425a12b2ebda16f5dea3ac41cee979f /app/models/wiki_content.rb
parent63bc3d4f89a688681f83a49b1eb8f4d320f8ac03 (diff)
downloadredmine-2d78003c87099fb6a832025027701e9456727727.tar.gz
redmine-2d78003c87099fb6a832025027701e9456727727.zip
Replaces a piggy back query with an association for loading wiki pages updates.
git-svn-id: http://svn.redmine.org/redmine/trunk@14625 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki_content.rb')
-rw-r--r--app/models/wiki_content.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb
index 223b6ca47..992e4902f 100644
--- a/app/models/wiki_content.rb
+++ b/app/models/wiki_content.rb
@@ -29,6 +29,8 @@ class WikiContent < ActiveRecord::Base
after_save :send_notification
+ scope :without_text, lambda {select(:id, :page_id, :version, :updated_on)}
+
def visible?(user=User.current)
page.visible?(user)
end