Skip to content

Commit 096f2d1

Browse files
committed
Reference updated errors attribute names method in deprecation warning
1 parent d796193 commit 096f2d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activemodel/lib/active_model/errors.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def values
271271
# person.errors.messages # => {:name=>["cannot be nil", "must be specified"]}
272272
# person.errors.keys # => [:name]
273273
def keys
274-
deprecation_removal_warning(:keys, "errors.map { |error| error.attribute }")
274+
deprecation_removal_warning(:keys, "errors.attribute_names")
275275
keys = @errors.map(&:attribute)
276276
keys.uniq!
277277
keys.freeze

0 commit comments

Comments
 (0)