Class: Mention
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Mention
- Defined in:
- app/models/mention.rb
Overview
Copyright © 2010-2011, Diaspora Inc. This file is
licensed under the Affero General Public License version 3 or later. See
the COPYRIGHT file.
Constant Summary collapse
- REGEX =
/@\{([^;]+); ([^\}]+)\}/
Instance Method Summary collapse
Instance Method Details
#delete_notification ⇒ Object
24 25 26 |
# File 'app/models/mention.rb', line 24 def delete_notification Notification.where(:target_type => self.class.name, :target_id => self.id).destroy_all end |
#notification_type(*args) ⇒ Object
20 21 22 |
# File 'app/models/mention.rb', line 20 def notification_type(*args) Notifications::Mentioned end |
#notify_recipient ⇒ Object
15 16 17 18 |
# File 'app/models/mention.rb', line 15 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 |