We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
value
https://github.com/toptal/chewy/blob/master/lib/chewy/type/mapping.rb#L59-L70 states:
# :value might be a proc or indexed object method name: field :full_name, type: 'string', value: :user_full_name
However, the code at https://github.com/toptal/chewy/blob/master/lib/chewy/fields/base.rb#L34-L54 does not support this. Specifically, if value is not a Proc, then the code calls object.send(name), when I would have expected it to call object.send(value) if value is a Symbol.
Proc
object.send(name)
object.send(value)
Symbol
https://github.com/toptal/chewy/blob/master/lib/chewy/fields/base.rb#L53
Possibly related to #549, though I have not examined the diff in depth.
The text was updated successfully, but these errors were encountered:
Oh, you are right, will fix it, thanks for the report!
Sorry, something went wrong.
No branches or pull requests
https://github.com/toptal/chewy/blob/master/lib/chewy/type/mapping.rb#L59-L70 states:
However, the code at https://github.com/toptal/chewy/blob/master/lib/chewy/fields/base.rb#L34-L54 does not support this. Specifically, if
value
is not aProc
, then the code callsobject.send(name)
, when I would have expected it to callobject.send(value)
ifvalue
is aSymbol
.https://github.com/toptal/chewy/blob/master/lib/chewy/fields/base.rb#L53
Possibly related to #549, though I have not examined the diff in depth.
The text was updated successfully, but these errors were encountered: