Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## comment.rb (remove the 'unless' condition & ID comparison...)
- self.newsfeed.permissions.notifiable_for_comments(self.id).each { |permission|
- Mailer.deliver_comment_notification(permission.user, self)
- }
- ## permission.rb (...and put it in to the named scope)
- named_scope :notifiable_for_comments, lambda {|userid|
- {:conditions => ['user_id != ? AND status = ? AND comment_notifications = ?', userid, true, true]}
- }
Add Comment
Please, Sign In to add comment