Class: Decidim::UserInterestsForm
- Defined in:
- app/forms/decidim/user_interests_form.rb
Overview
The form object that handles the data behind updating a user’s interests in her profile page.
Instance Method Summary collapse
Instance Method Details
#map_model(user) ⇒ Object
17 18 19 20 21 |
# File 'app/forms/decidim/user_interests_form.rb', line 17 def map_model(user) self.scopes = user.organization.scopes.top_level.map do |scope| UserInterestScopeForm.from_model(scope: scope, user: user) end end |
#newsletter_notifications_at ⇒ Object
11 12 13 14 15 |
# File 'app/forms/decidim/user_interests_form.rb', line 11 def return nil unless Time.current end |