Module: Diaspora::Fields::Author

Included in:
Comment, Conversation, Like, Message, Participation, PollParticipation
Defined in:
lib/diaspora/fields/author.rb

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object


6
7
8
9
10
11
12
13
14
# File 'lib/diaspora/fields/author.rb', line 6

def self.included(model)
  model.class_eval do
    belongs_to :author, class_name: "Person"

    delegate :diaspora_handle, to: :author

    validates :author, presence: true
  end
end