Sha256: 715c1270f3feedf8a8441bf64c08cdb96e13e8b08b58c7ce0949b2125919d49d
Contents?: true
Size: 494 Bytes
Versions: 7
Compression:
Stored size: 494 Bytes
Contents
# frozen_string_literal: true module Decidim class Coauthorship < ApplicationRecord include Decidim::Authorable belongs_to :coauthorable, polymorphic: true, counter_cache: true validates :coauthorable, presence: true def identity user_group || author end private # As it is used to validate by comparing to author.organization # @returns The Organization for the Coauthorable def organization coauthorable&.organization end end end
Version data entries
7 entries across 7 versions & 1 rubygems