aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-14 15:31:02 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-14 15:31:12 +0000
commit19bea9f1bd03b4601bf4c38539bff993d3eebc39 (patch)
tree8ecc0ccf00a9493d542d66de5a641654748e61b6 /activerecord/lib
parent384a60a16c7b881ed22d29c0babcdd2cb84f0790 (diff)
downloadrails-19bea9f1bd03b4601bf4c38539bff993d3eebc39.tar.gz
rails-19bea9f1bd03b4601bf4c38539bff993d3eebc39.tar.bz2
rails-19bea9f1bd03b4601bf4c38539bff993d3eebc39.zip
Stop the build asploding on 1.8.7
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 0ca627638a..77bf9d0905 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -105,6 +105,8 @@ module ActiveRecord
# Returns the value of the attribute identified by <tt>attr_name</tt> after it has been typecast (for example,
# "2004-12-12" in a data column is cast to a date object, like Date.new(2004, 12, 12)).
def read_attribute(attr_name)
+ return unless attr_name
+
attr_name = attr_name.to_s
methods = self.class.generated_external_attribute_methods