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 subclassing a serializer, the parent class's instance methods are not populated in the child class's instance method list, so _serializer_instance_method_defined? returns false.
In practice, I'm using URIs for identifiers, so define_method(:$id) returns scope.url_for(self). Ruby won't let you use def for a method starting with a $.
Expected behavior vs actual behavior
When subclassing a serializer, the parent class's instance methods are not populated in the child class's instance method list, so
_serializer_instance_method_defined?
returns false.This started breaking with commit a065bc2.
Steps to reproduce
Throws the following error:
undefined method '$id' for <Child:0x00...>
Environment
ActiveModelSerializers Version (commit ref if not on tag): 7acbb76
Output of
ruby -e "puts RUBY_DESCRIPTION"
: ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]OS Type & Version: OSX 10.11.4
Integrated application and version (e.g., Rails, Grape, etc): Rails
The text was updated successfully, but these errors were encountered: