diaspora/lib/diaspora/fields/author.rb
2017-09-17 19:29:15 +02:00

17 lines
326 B
Ruby

# frozen_string_literal: true
module Diaspora
module Fields
module Author
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
end
end
end