From 5beecd5947de4b25101a7f2e56e88f93e7b31491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 17 May 2012 19:28:15 +0200 Subject: [PATCH] Fix the build on 1.8.7 :trollface: --- lib/active_model/serializer.rb | 4 +--- test/test_helper.rb | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) 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