Skip to content

Rename RansackJson to Json and convert nested ids#131

Merged
AlessioRocco merged 5 commits intomasterfrom
fix-ransack-json-issue
Jul 3, 2020
Merged

Rename RansackJson to Json and convert nested ids#131
AlessioRocco merged 5 commits intomasterfrom
fix-ransack-json-issue

Conversation

@AlessioRocco
Copy link
Copy Markdown
Contributor

No description provided.

@AlessioRocco AlessioRocco self-assigned this Jun 26, 2020
@AlessioRocco AlessioRocco changed the title [snapshot] Fix RansackJson Fix RansackJson Jun 26, 2020
when Array
value[key] = decode_array(field)
when Hash, ActionController::Parameters
self.coerce_input(field, _ctx)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value[key] = self.coerce_input(field, _ctx) #maybe?

@rainerdema rainerdema force-pushed the fix-ransack-json-issue branch 4 times, most recently from c7c4f03 to 662c976 Compare July 3, 2020 11:30
@rainerdema rainerdema marked this pull request as ready for review July 3, 2020 11:47
@rainerdema rainerdema force-pushed the fix-ransack-json-issue branch 3 times, most recently from a3aad78 to 4b8ccee Compare July 3, 2020 13:34
Use a custom `Json` type instead of `GraphQL::Types::JSON` in
`AddPaymentToCheckout` because we need to have the database IDs
instead of the Relay-style ones.
Through the use of recursion, this allows us to decode and normalize
all the IDs present in nested JSON objects.
Using command "bundle exec rake schema:idl"
Copy link
Copy Markdown
Contributor

@ChristianRimondi ChristianRimondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@AlessioRocco AlessioRocco changed the title Fix RansackJson Rename RansackJson to Json and convert nested ids Jul 3, 2020
@AlessioRocco AlessioRocco merged commit 0108e86 into master Jul 3, 2020
@AlessioRocco AlessioRocco deleted the fix-ransack-json-issue branch July 3, 2020 14:25
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.

3 participants