lib/active_model/attribute_methods.rb in activemodel-3.2.0.rc2 vs lib/active_model/attribute_methods.rb in activemodel-3.2.0
- old
+ new
@@ -432,10 +432,10 @@
end
end
protected
def attribute_method?(attr_name)
- attributes.include?(attr_name)
+ respond_to_without_attributes?(:attributes) && attributes.include?(attr_name)
end
private
# Returns a struct representing the matching attribute method.
# The struct's attributes are prefix, base and suffix.