Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Fix loading of nested attributes (Hashes) in REST adapter #15

Closed

Conversation

svoboda-jan
Copy link
Contributor

This PR fixes loading of hashes from JSON. The previous way caused key-value attributes to be loaded as JS Object into opal, instead of Hash.

Also Model#from_form was updated to normalise hash keys and values:

'user[address]' => 'value'
#  becomes:
'user' => { 'address' => 'value' }

'user[]' => 'value'
# becomes:
'user' => [ 'value' ]

Another thing this PR fixes is Persistence#did_destroy, which weren't removing items from the RecordArray.

@svoboda-jan
Copy link
Contributor Author

@adambeynon 👍 This PR is ready, but not sure what is happening with the CI.

@svoboda-jan
Copy link
Contributor Author

@adambeynon Any update on this ? I have updated the PR and the CI seems ok now.

@svoboda-jan
Copy link
Contributor Author

@adambeynon Any thoughts on this ?

@svoboda-jan svoboda-jan reopened this Jun 13, 2014
@elia
Copy link
Member

elia commented Sep 29, 2018

I'm going to close all PRs before archiving the project, due to lack of maintainers

@elia elia closed this Sep 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants