mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Do not convert attrs to String until needed
This commit is contained in:
parent
daa9304398
commit
f6ea07dd22
@ -64,8 +64,6 @@ module ActiveModel
|
||||
options = attrs.extract_options!
|
||||
|
||||
attrs.each do |attr|
|
||||
attr = attr.to_s
|
||||
|
||||
unless method_defined?(attr)
|
||||
define_method attr do
|
||||
object.send attr
|
||||
|
||||
@ -5,7 +5,7 @@ module ActiveModel
|
||||
class Serializer
|
||||
class Association
|
||||
def initialize(name, options={})
|
||||
@name = name
|
||||
@name = name.to_s
|
||||
@options = options
|
||||
|
||||
self.embed = options[:embed] || SETTINGS[:embed]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user