mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-22 14:31:48 +00:00
fixup! fixup! feat: almacenar los campos
This commit is contained in:
parent
1fc4797c4f
commit
d2136380d5
1 changed files with 2 additions and 2 deletions
|
@ -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 = %i[privacy_policy_accepted terms_of_service_accepted code_of_conduct_accepted available_for_feedback_accepted]
|
||||||
|
|
||||||
CONSENT_FIELDS.each do |field|
|
CONSENT_FIELDS.each do |field|
|
||||||
attr_accessor field
|
attribute field, :boolean
|
||||||
end
|
end
|
||||||
|
|
||||||
before_save :update_consent_fields!
|
before_save :update_consent_fields!
|
||||||
|
@ -18,7 +18,7 @@ class Usuarie
|
||||||
|
|
||||||
def update_consent_fields!
|
def update_consent_fields!
|
||||||
CONSENT_FIELDS.each do |field|
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue