Sha256: b664704d28ffb73a4bc809de6e682542f25994d560e80bf1e9bb886959b94843
Contents?: true
Size: 553 Bytes
Versions: 7
Compression:
Stored size: 553 Bytes
Contents
# frozen_string_literal: true module Decidim # The form object that handles the data behind updating a user's # interests in her profile page. class UserInterestsForm < Form mimic :user attribute :scopes, Array[UserInterestScopeForm] def newsletter_notifications_at return nil unless newsletter_notifications Time.current end def map_model(user) self.scopes = user.organization.scopes.top_level.map do |scope| UserInterestScopeForm.from_model(scope: scope, user: user) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems