Skip to content

Fix reflection#2

Open
cafeal wants to merge 1 commit into
glebtv:masterfrom
cafeal:fix-reflection
Open

Fix reflection#2
cafeal wants to merge 1 commit into
glebtv:masterfrom
cafeal:fix-reflection

Conversation

@cafeal

@cafeal cafeal commented Mar 29, 2017

Copy link
Copy Markdown

the serizlizer returns active_model associations and its class is ModelName::ActiveRecord_Associations_CollectionProxy when has_many
It may be a subclass of ActiveRecord::Associations::CollectionProxy < Relation < Object, not subclass of Array
so, at least on my environment, val.kind_of?(Array) returns false

Is it a bug?
sorry, I have less confidence 'cause I can't understand why existing codes passes the specs
I want you to investigate

the serizlizer returns active_model associations and its class is *ModelName*::ActiveRecord_Associations_CollectionProxy
It may be a subclass of ActiveRecord::Associations::CollectionProxy < Relation < Object, not Array
so, at least on my environment, val.kind_of?(Array) does not work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant