Sha256: 707f114bbee7eba4e1e58b87fca26b71ac911dfd3bb251d63ce5cb7b22f10dbd
Contents?: true
Size: 1.19 KB
Versions: 31
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true module Decidim class ParticipatoryProcessGroup < ApplicationRecord include Decidim::Resourceable include Decidim::Traceable include Decidim::HasUploadValidations include Decidim::TranslatableResource translatable_fields :title, :description, :developer_group, :local_area, :meta_scope, :participatory_scope, :participatory_structure, :target has_many :participatory_processes, foreign_key: "decidim_participatory_process_group_id", class_name: "Decidim::ParticipatoryProcess", inverse_of: :participatory_process_group, dependent: :nullify belongs_to :organization, foreign_key: "decidim_organization_id", class_name: "Decidim::Organization" has_one_attached :hero_image validates_upload :hero_image, uploader: Decidim::HeroImageUploader # Scope to return only the promoted groups. # # Returns an ActiveRecord::Relation. def self.promoted where(promoted: true) end def self.log_presenter_class_for(_log) Decidim::ParticipatoryProcesses::AdminLog::ParticipatoryProcessGroupPresenter end end end
Version data entries
31 entries across 31 versions & 1 rubygems