aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/read.rb
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-10-16 23:17:14 -0400
committerSantiago Pastorino <santiago@wyeworks.com>2010-10-17 12:26:47 -0200
commitf527f9097b20d4c6178bcdd70a2be11a129bc866 (patch)
treea8f3b55e99e7d46097eb1d07cc6e6fc99c5e06b1 /activerecord/lib/active_record/attribute_methods/read.rb
parentea14396c455b0816e87abe424275290fc4b09b32 (diff)
downloadrails-f527f9097b20d4c6178bcdd70a2be11a129bc866.tar.gz
rails-f527f9097b20d4c6178bcdd70a2be11a129bc866.tar.bz2
rails-f527f9097b20d4c6178bcdd70a2be11a129bc866.zip
no need to check for nil
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/read.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 01699746d8..a487bcf78b 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -85,7 +85,7 @@ module ActiveRecord
def _read_attribute(attr_name)
attr_name = attr_name.to_s
attr_name = self.class.primary_key if attr_name == 'id'
- if !(value = @attributes[attr_name]).nil?
+ if (value = @attributes[attr_name])
if column = column_for_attribute(attr_name)
if unserializable_attribute?(attr_name, column)
unserialize_attribute(attr_name)