Class: Decidim::Admin::StaticPageForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Admin::StaticPageForm
- Includes:
- TranslatableAttributes
- Defined in:
- app/forms/decidim/admin/static_page_form.rb
Overview
A form object to create or update pages.
Instance Method Summary collapse
Instance Method Details
#control_public_access? ⇒ Boolean
44 45 46 |
# File 'app/forms/decidim/admin/static_page_form.rb', line 44 def control_public_access? current_organization.force_users_to_authenticate_before_access_organization? end |
#slug ⇒ Object
27 28 29 |
# File 'app/forms/decidim/admin/static_page_form.rb', line 27 def slug super.to_s.downcase end |
#topic ⇒ Object
31 32 33 34 35 36 |
# File 'app/forms/decidim/admin/static_page_form.rb', line 31 def topic @topic ||= StaticPageTopic.find_by( organization:, id: topic_id ) end |
#topics ⇒ Object
38 39 40 41 42 |
# File 'app/forms/decidim/admin/static_page_form.rb', line 38 def topics @topics ||= StaticPageTopic.where( organization: current_organization ) end |