Class: Decidim::Proposals::CollaborativeDraftForm
- Inherits:
-
ProposalForm
- Object
- Form
- ProposalForm
- Decidim::Proposals::CollaborativeDraftForm
- Defined in:
- app/forms/decidim/proposals/collaborative_draft_form.rb
Overview
A form object to be used when public users want to create a Collaborative Draft.
Instance Method Summary collapse
Methods inherited from ProposalForm
#category, #component_automatic_hashtags, #component_suggested_hashtags, #extra_hashtags, #geocoded?, #geocoding_enabled?, #has_address?, #scope, #scope_id, #suggested_hashtag_checked?, #suggested_hashtags
Instance Method Details
#map_model(model) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/forms/decidim/proposals/collaborative_draft_form.rb', line 7 def map_model(model) super return unless model.categorization self.category_id = model.categorization.decidim_category_id end |
#user_group ⇒ Object
15 16 17 |
# File 'app/forms/decidim/proposals/collaborative_draft_form.rb', line 15 def user_group @user_group ||= Decidim::UserGroup.find user_group_id if user_group_id.present? end |