Class: Decidim::NavigationMaps::BlueprintForm
- Inherits:
-
Form
- Object
- Form
- Decidim::NavigationMaps::BlueprintForm
- Includes:
- TranslatableAttributes
- Defined in:
- app/forms/decidim/navigation_maps/blueprint_form.rb
Overview
A form object used to configure the blueprint content block from the admin panel.
Instance Method Summary collapse
-
#ident ⇒ Object
errors.add(:image, “no image”) unless image.present? errors.add(:blueprint, “no blueprint”) unless blueprint.present? end.
- #image? ⇒ Boolean
Instance Method Details
#ident ⇒ Object
errors.add(:image, “no image”) unless image.present?
errors.add(:blueprint, "no blueprint") unless blueprint.present?
end
32 33 34 |
# File 'app/forms/decidim/navigation_maps/blueprint_form.rb', line 32 def ident id || "_" end |
#image? ⇒ Boolean
36 37 38 39 |
# File 'app/forms/decidim/navigation_maps/blueprint_form.rb', line 36 def image? return unless image && image.respond_to?(:url) return image.content_type.start_with? "image" if image.content_type.present? end |