Sha256: 7c9d71a69f9d3de3d6ac93debca48762f219b817dcfe4e1dad39cf05f7baceb0
Contents?: true
Size: 814 Bytes
Versions: 19
Compression:
Stored size: 814 Bytes
Contents
# frozen_string_literal: true module Decidim # Area types allows to use different types of areas in participatory space # (terriotrial, sectorial, etc.) class AreaType < ApplicationRecord include Decidim::TranslatableResource include Decidim::Traceable translatable_fields :name, :plural belongs_to :organization, foreign_key: "decidim_organization_id", class_name: "Decidim::Organization", inverse_of: :area_types has_many :areas, class_name: "Decidim::Area", inverse_of: :area_type, dependent: :nullify validates :name, presence: true def translated_name Decidim::AreaTypePresenter.new(self).translated_name end def self.log_presenter_class_for(_log) Decidim::AdminLog::AreaTypePresenter end end end
Version data entries
19 entries across 19 versions & 1 rubygems