Sha256: bf8af62f2e2a80f381a9c56c474e5735518b68397f1b131105637ef4aaf670ca

Contents?: true

Size: 577 Bytes

Versions: 20

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # Initiative type.
  class InitiativesType < ApplicationRecord
    validates :title, :description, presence: true

    mount_uploader :banner_image, Decidim::BannerImageUploader

    belongs_to :organization,
               foreign_key: "decidim_organization_id",
               class_name: "Decidim::Organization"

    has_many :scopes,
             foreign_key: "decidim_initiatives_types_id",
             class_name: "Decidim::InitiativesTypeScope",
             dependent: :destroy,
             inverse_of: :type
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
decidim-initiatives-0.16.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.16.0 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.15.2 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.15.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.15.0 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.14.4 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.14.3 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.14.2 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.14.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.13.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.12.2 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.13.0 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.12.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.13.0.pre1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.12.0 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.11.2 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.12.0.pre app/models/decidim/initiatives_type.rb
decidim-initiatives-0.11.1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.11.0.pre1 app/models/decidim/initiatives_type.rb
decidim-initiatives-0.9.1 app/models/decidim/initiatives_type.rb