Class: Mention
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Mention
- Defined in:
- app/models/mention.rb
Overview
Copyright © 2010, Diaspora Inc. This file is
licensed under the Affero General Public License version 3 or later. See the COPYRIGHT file.
Instance Method Summary (collapse)
Instance Method Details
- (Object) delete_notification
22 23 24 |
# File 'app/models/mention.rb', line 22 def delete_notification Notification.where(:target_type => self.class.name, :target_id => self.id).delete_all end |
- (Object) notification_type(*args)
18 19 20 |
# File 'app/models/mention.rb', line 18 def notification_type(*args) Notifications::Mentioned end |
- (Object) notify_recipient
13 14 15 16 |
# File 'app/models/mention.rb', line 13 def notify_recipient Rails.logger.info "event=mention_sent id=#{self.id} to=#{person.diaspora_handle} from=#{post.author.diaspora_handle}" Notification.notify(person.owner, self, post.) unless person.remote? end |