[Proposal] Optional on LoginActivity fields
truongnmt opened this issue · comments
Hi there! First, thanks for your awesome work!
I'm using AuthTrail for a while now. To fit my use case, I'm looking for a workaround to:
- Delete fields I don't use:
city region latitude longitude
I got this error when delete those fields, obviously:
Error performing AuthTrail::GeocodeJob (Job ID: d7bef36a-5fe6-468f-a70b-79353f11bff9) from Async(default) in 2.55ms: ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'city' in 'field list': UPDATE
login_activities
SETcity
= NULL,region
= NULL,country
= 'United States',latitude
= 0.0,longitude
= 0.0 WHERElogin_activities
.id
= 1):
- Add extra custom field(s) to LoginActivity. Other than fields from Devise, we want to save some extra field(s).
What do you think about this? Thanks a lot!
Hey @truongnmt,
- Sound good to me.
- #21 doesn't look really clean, messy I would say. For flexibility I thinking a way to add field(s), not just one, each field have a custom way to retrieve data. Kind of each fields has it proc.
🤔 I'm drafting one anyway
Cleaning up issues, but feel free to submit PRs.
fwiw, there's now a transform_method
option on master.
Edit: was released as transform_method
(was enrich_method
previously)
Wow! Thanks a lot! 💯💯💯