Permalink
Browse files

Use Attribute#default? in AttributeSet#skip_default?

  • Loading branch information...
1 parent d84f4df commit 67ca515f71688c5d51cb8bb3842dd4cdd34a771b @amarshall amarshall committed Jan 31, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/virtus/attribute_set.rb
@@ -209,7 +209,7 @@ def finalize
# @api private
def skip_default?(object, attribute)
- attribute.lazy? || object.instance_variable_defined?(attribute.instance_variable_name)
+ attribute.lazy? || attribute.defined?(object)
end
# Merge the attributes into the index

0 comments on commit 67ca515

Please sign in to comment.