mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Docfix: Use public interface instead of setting instance variables
Dynamically setting instance variables based on user input probably isn't a great idea. Better to go through the setter methods provided by attr_accessor.
This commit is contained in:
parent
a68c6cccf0
commit
9906eb1355
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ module ActiveModel
|
||||||
#
|
#
|
||||||
# def attributes=(hash)
|
# def attributes=(hash)
|
||||||
# hash.each do |key, value|
|
# hash.each do |key, value|
|
||||||
# instance_variable_set("@#{key}", value)
|
# send("#{key}=", value)
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue