Permalink
Browse files

No need to define a local var here.

  • Loading branch information...
miloops authored and tenderlove committed Nov 19, 2010
1 parent da583df commit 14055ea28285107af04ed0ce4ef0ec542a9a9530
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/base.rb
@@ -1569,8 +1569,7 @@ def attribute_for_inspect(attr_name)
# 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.

0 comments on commit 14055ea

Please sign in to comment.