15 lines
290 B
Ruby
15 lines
290 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Creation
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
belongs_to :user, polymorphic: true
|
|
alias_method :author, :user
|
|
alias_method :creator, :user
|
|
|
|
validates :user_id, presence: true
|
|
validates :user_type, presence: true
|
|
end
|
|
end
|