Sha256: 149de02f3648a90f0b433f6ea4621529d4f48dbd3cda047d8fc71fa0e145004b
Contents?: true
Size: 634 Bytes
Versions: 32
Compression:
Stored size: 634 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 belongs_to :organization, foreign_key: "decidim_organization_id", class_name: "Decidim::Organization", inverse_of: :area_types has_many :areas, foreign_key: "area_type_id", class_name: "Decidim::Area", inverse_of: :area_type, dependent: :nullify validates :name, presence: true def translated_name Decidim::AreaTypePresenter.new(self).translated_name end end end
Version data entries
32 entries across 32 versions & 1 rubygems