class ActiveModelSerializers::Model
def self.attributes(*names)
-
name
(String, Symbol
) -- -
names
(Array
) --
Overloads:
-
attributes(names)
Other tags:
- Note: - For now, the Model only supports the notion of 'attributes'.
def self.attributes(*names) self.attribute_names |= names.map(&:to_sym) # Silence redefinition of methods warnings ActiveModelSerializers.silence_warnings do attr_accessor(*names) end end