1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove AR::Base#attributes argument. [#52 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
Frederick Cheung 2008-05-12 00:29:16 +01:00 committed by Pratik Naik
parent 00640de861
commit d2212c1601

View file

@ -2342,7 +2342,7 @@ module ActiveRecord #:nodoc:
# Returns a hash of all the attributes with their names as keys and the values of the attributes as values.
def attributes(options = nil)
def attributes
self.attribute_names.inject({}) do |attrs, name|
attrs[name] = read_attribute(name)
attrs