Active_model_serializers: Is there a upgrade guide from 0.9.x -> 0.10.x ??

Created on 14 Jan 2017  路  4Comments  路  Source: rails-api/active_model_serializers

Something like this?

https://github.com/rails-api/active_model_serializers/blob/6c6e45b23f464bd0bb92ae05a4284b72b017be21/docs/howto/upgrade_from_0_8_to_0_10.md

Running into lot of issues, so was wondering. For example I am getting ERROR! NameError: uninitialized constant ActiveModel::ArraySerializer and cant seem to find the fix.

Upgrading 0.10.x 0.9.x

All 4 comments

@kapso did you find one?

I'll keep some notes for a guide here (0.8 to 0.10):

  1. Change the adapter to json:
# in config/initializers/active_model_serializer.rb
ActiveModelSerializers.config.adapter = :json
  1. On all respond_with calls, add full depth includes
# in app/controllers/api/*.rb
@collection = Collection.where ...
respond_with @collection, include: "**"

@toobulkeh Thanks for keeping your notes here. I thought I remembered someone writing up their 0.9 -> 0.10 changes, but didn't want to make a guide because thought they were too idiosyncratic... didn't find it with the upgrade label...

Was this page helpful?
0 / 5 - 0 ratings