You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an attribute with an object method name (in my case display, but any other will cause the bug) the serializers will get the method's output instead of the value sent for serialization.
Steps to reproduce
(e.g., detailed walkthrough, runnable script, example application)
Expected behavior vs actual behavior
When using an attribute with an object method name (in my case
display
, but any other will cause the bug) the serializers will get the method's output instead of the value sent for serialization.Steps to reproduce
(e.g., detailed walkthrough, runnable script, example application)
Environment
ActiveModelSerializers Version (commit ref if not on tag):
ActiveModel::Serializer::VERSION => "0.10.3"
Output of
ruby -e "puts RUBY_DESCRIPTION"
:ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
OS Type & Version:
MacOS Sierra 10.12.1
Integrated application and version (e.g., Rails, Grape, etc):
None
Backtrace
(e.g., provide any applicable backtraces from your application)
Additonal helpful information
(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)
looking into github, the bug is here:
active_model_serializers/lib/active_model/serializer.rb
Lines 191 to 192 in 95f832f
inserted in commit 6370e5c
maybe switching the order of the if/else will fix this?
Thanks!
The text was updated successfully, but these errors were encountered: