jsonapi, active_model_serializers and sequel models

73 views
Skip to first unread message

Paul Cowan

unread,
Oct 9, 2015, 9:16:23 AM10/9/15
to rails-api-core
I am updating some old ember-data code that uses a Sinatra backend with sequel models.

The backend currently uses AMS 0.8.

I am doing a quick spike on the master branch and it seems like the jsonapi adapter is really expecting ActiveModel instance to serialize against.

e.g. the following code:


        def resource_identifier_type_for(serializer)
          return serializer._type if serializer._type
          if ActiveModel::Serializer.config.jsonapi_resource_type == :singular
            serializer.object.class.model_name.singular
          else
            serializer.object.class.model_name.plural
          end
        end

Is it possible to use Sequel::Model without having to do a lot of patching or am I better off waiting until things stabilise?



Reply all
Reply to author
Forward
0 new messages