-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field Defaults: Allow default primitive w/o Lambda #191
Field Defaults: Allow default primitive w/o Lambda #191
Conversation
- [Update] Persistence was expecting the default value to support either `call` or `dup` but certain values like numbers and booleans do not support `dup` since they are copy by value. Adding support so can write `:default => 1` or `{ default: 1 }` as README suggests with `field :actions_taken, :integer, {default: 0}`.
5 similar comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
@richardhsu @andrykonchin We should start adding to a |
Oh, yes sounds good! Will do that moving forward! :) |
@pboling please wait for my review before merging. I need at least a day to look at PR because of time zone shift |
@andrykonchin OK, will wait in the future. |
either
call
ordup
but certain values like numbers and booleansdo not support
dup
since they are copy by value. Adding supportso can write
:default => 1
or{ default: 1 }
as READMEsuggests with
field :actions_taken, :integer, {default: 0}
.CR @pboling @andrykonchin thanks!