-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
After digging around the code it seems not easily patchable for adding attribute types.
For example, would love to write:
has_settings do |s|
s.key :admin, defaults: {admin: false}, types: {admin: :boolean}
end
it would be a great API to set attribute types and not have to do it for each update.
my current problem:
pry(#<SettingsController>)> person.settings(:info).something
=> false
[24] pry(#<SettingsController>)> person.settings(:info).something = "true"
=> "true"
[26] pry(#<SettingsController>)> p.save!
=> true
[27] pry(#<SettingsController>)> person.settings(:info).something
=> "true" # would like for that last value to be true
Would you accept a PR with this change? using versioned rails type casting
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels