Associations::Config is now Associations::Base

This commit is contained in:
Santiago Pastorino 2013-05-15 14:23:09 -07:00
parent 2b22acff53
commit 03669a74bc

View File

@ -1,7 +1,7 @@
module ActiveModel module ActiveModel
class Serializer class Serializer
module Associations #:nodoc: module Associations #:nodoc:
class Config #:nodoc: class Base #:nodoc:
def initialize(name, options={}, serializer_options={}) def initialize(name, options={}, serializer_options={})
@name = name @name = name
@options = options @options = options
@ -60,7 +60,7 @@ module ActiveModel
attr_reader :options, :serializer_options attr_reader :options, :serializer_options
end end
class HasMany < Config #:nodoc: class HasMany < Base #:nodoc:
def key def key
if key = options[:key] if key = options[:key]
key key
@ -102,7 +102,7 @@ module ActiveModel
end end
end end
class HasOne < Config #:nodoc: class HasOne < Base #:nodoc:
def embeddable? def embeddable?
if polymorphic? && associated_object.nil? if polymorphic? && associated_object.nil?
false false