app/forms/decidim/budgets/admin/project_form.rb in decidim-budgets-0.0.3 vs app/forms/decidim/budgets/admin/project_form.rb in decidim-budgets-0.0.5
- old
+ new
@@ -6,18 +6,17 @@
class ProjectForm < Decidim::Form
include TranslatableAttributes
include TranslationsHelper
translatable_attribute :title, String
- translatable_attribute :short_description, String
translatable_attribute :description, String
+
attribute :budget, Integer
attribute :decidim_scope_id, Integer
attribute :decidim_category_id, Integer
attribute :proposal_ids, Array[Integer]
validates :title, translatable_presence: true
- validates :short_description, translatable_presence: true
validates :description, translatable_presence: true
validates :budget, presence: true, numericality: { greater_than: 0 }
validates :scope, presence: true, if: ->(form) { form.decidim_scope_id.present? }
validates :category, presence: true, if: ->(form) { form.decidim_category_id.present? }