Module: Diaspora::Signature

Included in:
CommentSignature, LikeSignature, PollParticipationSignature
Defined in:
lib/diaspora/signature.rb

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/diaspora/signature.rb', line 5

def self.included(model)
  model.class_eval do
    belongs_to :signature_order
    validates :signature_order, presence: true

    validates :author_signature, presence: true

    serialize :additional_data, Hash

    def order
      signature_order.order.split
    end
  end
end