Sha256: ab2ca4833c8bbb417da07d768e6d31be3fc75de4fe76566de96bf111d4ecec45
Contents?: true
Size: 867 Bytes
Versions: 7
Compression:
Stored size: 867 Bytes
Contents
# frozen_string_literal: true module Decidim # It represents a member of the assembly (president, secretary, ...) # Can be linked to an existent user in the platform class AssemblyMember < ApplicationRecord include Decidim::Traceable include Decidim::Loggable POSITIONS = %w(president vice_president secretary other).freeze belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::UserBaseEntity", optional: true belongs_to :assembly, foreign_key: "decidim_assembly_id", class_name: "Decidim::Assembly" alias participatory_space assembly default_scope { order(weight: :asc, created_at: :asc) } scope :not_ceased, -> { where("ceased_date >= ? OR ceased_date IS NULL", Time.zone.today) } def self.log_presenter_class_for(_log) Decidim::Assemblies::AdminLog::AssemblyMemberPresenter end end end
Version data entries
7 entries across 7 versions & 1 rubygems