Don't add attribute_names to ActiveModel::Serialization public API
This commit is contained in:
parent
c5b11bb1c4
commit
75ea828409
@ -149,19 +149,7 @@ def serializable_hash(options = nil)
|
||||
end
|
||||
|
||||
# Returns an array of attribute names as strings
|
||||
#
|
||||
# class Person
|
||||
# include ActiveModel::Serialization
|
||||
# attr_accessor :name, :age
|
||||
# def attributes
|
||||
# { 'name' => name, 'age' => age }
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# person = Person.new
|
||||
# person.attribute_names
|
||||
# # => ["name", "age"]
|
||||
def attribute_names
|
||||
def attribute_names # :nodoc:
|
||||
attributes.keys
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user