1
0
Fork 0
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:
Richard Livsey 2013-06-07 12:41:05 +02:00
parent a68c6cccf0
commit 9906eb1355

View file

@ -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
# #