From d2136380d5e678439de216e08122660500b3062f Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 18:28:31 -0300 Subject: [PATCH] fixup! fixup! feat: almacenar los campos --- app/models/concerns/usuarie/consent.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/concerns/usuarie/consent.rb b/app/models/concerns/usuarie/consent.rb index 6d9b5051..14e67fbc 100644 --- a/app/models/concerns/usuarie/consent.rb +++ b/app/models/concerns/usuarie/consent.rb @@ -9,7 +9,7 @@ class Usuarie CONSENT_FIELDS = %i[privacy_policy_accepted terms_of_service_accepted code_of_conduct_accepted available_for_feedback_accepted] CONSENT_FIELDS.each do |field| - attr_accessor field + attribute field, :boolean end before_save :update_consent_fields! @@ -18,7 +18,7 @@ class Usuarie def update_consent_fields! CONSENT_FIELDS.each do |field| - send(:"#{field}_at=", Time.now) if send(:field).present? + send(:"#{field}_at=", Time.now) if send(field).present? end end end