diff --git a/lib/active_model/serializer.rb b/lib/active_model/serializer.rb index 5aef7812..b4d1c9ed 100644 --- a/lib/active_model/serializer.rb +++ b/lib/active_model/serializer.rb @@ -504,9 +504,7 @@ module ActiveModel hash end - def read_attribute_for_serialization(name) - send name - end + alias :read_attribute_for_serialization :send end end diff --git a/test/test_helper.rb b/test/test_helper.rb index a540cca5..1ab0e162 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -34,3 +34,7 @@ ActiveSupport::TestCase.class_eval do @routes = ::TestHelper::Routes end end + +class Object + undef_method :id if respond_to?(:id) +end \ No newline at end of file