diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/comment.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb index 772bb3eda..59f91ffb7 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -33,6 +33,8 @@ class Comment < ActiveRecord::Base validate :check_body_has_content, :check_body_uses_mixed_capitals + scope :visible, where(:visible => true) + after_save :event_xapian_update # When posting a new comment, use this to check user hasn't double diff --git a/app/models/user.rb b/app/models/user.rb index bb40dbc26..df12b823b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -197,10 +197,6 @@ class User < ActiveRecord::Base (locale || I18n.locale).to_s end - def visible_comments - comments.find(:all, :conditions => 'visible') - end - # Don't display any leading/trailing spaces # TODO: we have strip_attributes! now, so perhaps this can be removed (might # be still needed for existing cases) |