Skip to content

Migrating from AMS #11

Answered by ElMassimo
dgmora asked this question in Q&A
Apr 19, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi David!

undefined method `one_as_hash'

Thanks for reporting, this is a bug in the latest versions, have a fix here:

unless doesn't exist as opposite as if
Had to replace key: with as:

These were low-hanging fruit, implemented in:


scope is not implemented in compat-mode because it makes serializers context-dependent, and is too implicit, making it more difficult to understand and unit test them.

Usually, the best approach is to pass any additional information the serializer needs as options. As a temporary measure during migration, you could also use something like RequestLocals to share the current controller (or curre…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dgmora
Comment options

Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants