You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2022. It is now read-only.
When remotely parses the remote object, it attaches the root "foobars" key as an attribute on the model. This means that if I have a class in my local project named Grass...
class Grass
has_many_remote :foobars
end
class Foobar < Remotely::Model
end
... if I want to iterate over the grass's foobars, I have to do this
@grass.foobars.foobars.each
... instead of ...
@grass.foobars.each
Proposed solution
When parsing a has_many_remote response, if the root key of the returned json equals the name of the association, attach the returned json's array value for said key instead of the key. Thoughts?