Class: Decidim::ActionDelegator::Admin::PonderationForm
- Inherits:
-
Form
- Object
- Form
- Decidim::ActionDelegator::Admin::PonderationForm
- Defined in:
- app/forms/decidim/action_delegator/admin/ponderation_form.rb
Instance Method Summary collapse
Instance Method Details
#name_uniqueness ⇒ Object
15 16 17 18 19 20 |
# File 'app/forms/decidim/action_delegator/admin/ponderation_form.rb', line 15 def name_uniqueness return unless setting return unless setting.ponderations.where(name: name).where.not(id: id).any? errors.add(:name, :taken) end |
#setting ⇒ Object
22 23 24 |
# File 'app/forms/decidim/action_delegator/admin/ponderation_form.rb', line 22 def setting @setting ||= context[:setting] end |