Class: Like
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Like
- Includes:
- Diaspora::Guid, Diaspora::Relayable, Diaspora::Socketable, Diaspora::Webhooks, ROXML
- Defined in:
- app/models/like.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)
- - (Object) diaspora_handle
- - (Object) diaspora_handle=(nh)
- - (Object) notification_type(user, person)
- - (Object) parent
- - (Object) parent=(parent)
- - (Object) parent_class
Methods included from Diaspora::Socketable
#socket_to_user, #unsocket_from_user
Methods included from Diaspora::Relayable
#after_receive, included, #initialize_signatures, #parent_guid, #parent_guid=, #receive, #relayable?, #signature_valid?, #subscribers, #verify_parent_author_signature
Methods included from Diaspora::Encryptable
#sign_with_key, #signable_accessors, #signable_string, #verify_signature
Methods included from Diaspora::Guid
Methods included from Diaspora::Webhooks
#receive, #subscribers, #to_diaspora_xml, #x
Instance Method Details
- (Object) diaspora_handle
24 25 26 |
# File 'app/models/like.rb', line 24 def diaspora_handle self..diaspora_handle end |
- (Object) diaspora_handle=(nh)
28 29 30 |
# File 'app/models/like.rb', line 28 def diaspora_handle= nh self. = Webfinger.new(nh).fetch end |
- (Object) notification_type(user, person)
44 45 46 |
# File 'app/models/like.rb', line 44 def notification_type(user, person) Notifications::Liked if self.post. == user.person && user.person != person end |
- (Object) parent
36 37 38 |
# File 'app/models/like.rb', line 36 def parent self.post end |
- (Object) parent=(parent)
40 41 42 |
# File 'app/models/like.rb', line 40 def parent= parent self.post = parent end |
- (Object) parent_class
32 33 34 |
# File 'app/models/like.rb', line 32 def parent_class Post end |