Sha256: a54175bb27e37687cb3561c9f8e66f607d27487c1217649c1c6dc27de64b3060
Contents?: true
Size: 803 Bytes
Versions: 18
Compression:
Stored size: 803 Bytes
Contents
# frozen_string_literal: true module Decidim class InitiativesTypeScope < ApplicationRecord belongs_to :type, foreign_key: "decidim_initiatives_types_id", class_name: "Decidim::InitiativesType", inverse_of: :scopes belongs_to :scope, foreign_key: "decidim_scopes_id", class_name: "Decidim::Scope" has_many :initiatives, foreign_key: "scoped_type_id", class_name: "Decidim::Initiative", dependent: :restrict_with_error, inverse_of: :scoped_type validates :scope, uniqueness: { scope: :type } validates :supports_required, presence: true validates :supports_required, numericality: { only_integer: true, greater_than: 0 } end end
Version data entries
18 entries across 18 versions & 1 rubygems