diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-11-20 07:38:08 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-24 01:36:59 +0800 |
commit | 14055ea28285107af04ed0ce4ef0ec542a9a9530 (patch) | |
tree | fdad8ffc2c68a637ace79b8f13a71c4eebef8c97 /activerecord | |
parent | da583df50c32d50261b682664fe43fd5e2f58f87 (diff) | |
download | rails-14055ea28285107af04ed0ce4ef0ec542a9a9530.tar.gz rails-14055ea28285107af04ed0ce4ef0ec542a9a9530.tar.bz2 rails-14055ea28285107af04ed0ce4ef0ec542a9a9530.zip |
No need to define a local var here.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index aa028c6f36..f9743b4fea 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1569,8 +1569,7 @@ MSG # Returns true if the specified +attribute+ has been set by the user or by a database load and is neither # nil nor empty? (the latter only applies to objects that respond to empty?, most notably Strings). def attribute_present?(attribute) - value = read_attribute(attribute) - !value.blank? + !read_attribute(attribute).blank? end # Returns the column object for the named attribute. |