Sha256: 1f877556d44600b85bc723ad3e3cca228ee59d99752e65b6d7696dd5fb888872
Contents?: true
Size: 1.06 KB
Versions: 69
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true module Decidim module Meetings module Admin # This class holds a Form to update meeting agenda items class MeetingAgendaItemsForm < Decidim::Form include TranslatableAttributes translatable_attribute :title, String translatable_attribute :description, String attribute :duration, Integer, default: 0 attribute :parent_id, Integer attribute :position, Integer attribute :deleted, Boolean, default: false attribute :agenda_item_children, Array[MeetingAgendaItemsForm] validates :title, translatable_presence: true, unless: :deleted validates :position, numericality: { greater_than_or_equal_to: 0 }, unless: :deleted validates :duration, presence: true, numericality: { greater_than_or_equal_to: 0 } def to_param return id if id.present? "meeting-agenda-item-id" end def to_param_child return id if id.present? "meeting-agenda-item-child-id" end end end end end
Version data entries
69 entries across 69 versions & 1 rubygems