5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-18 11:26:22 +00:00

fixup! fixup! feat: almacenar los campos

This commit is contained in:
f 2023-03-28 18:28:31 -03:00
parent 1fc4797c4f
commit d2136380d5

View file

@ -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