Sha256: 196b75ff774a778469c2dff33a551381c1a5d9a641669b194137429daf63b181
Contents?: true
Size: 865 Bytes
Versions: 4
Compression:
Stored size: 865 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # A form object used to create participatory processes steps from the admin # dashboard. # class ParticipatoryProcessStepForm < Rectify::Form include TranslatableAttributes translatable_attribute :title, String translatable_attribute :description, String translatable_attribute :short_description, String mimic :participatory_process_step attribute :start_date, DateTime attribute :end_date, DateTime translatable_validates :title, :description, :short_description, presence: true validates :start_date, date: { before: :end_date, allow_blank: true, if: proc { |obj| obj.end_date.present? } } validates :end_date, date: { after: :start_date, allow_blank: true, if: proc { |obj| obj.start_date.present? } } end end end
Version data entries
4 entries across 4 versions & 2 rubygems