Quantcast
Viewing all articles
Browse latest Browse all 4826

Models in pod structure under subfolder

@teejay wrote:

Hello, I have the following structure of a grown project where we need to implement a few bigger changes. We want to separate the old code base from the new features, but unfortunately we have a few difficulties. We decided to use pods at some point so we thought we create the following structure

app
  models
    model1.js
  pods
    subfolder
      model1
      index

In a normal app you probably only access to one api, unfortunately we have 2 at this stage and to make matters worse, the old one uses the ActiveRecordAdapter and the new one will use a JsonAPIAdapter. So all models in the pod subfolder should use JSONAPI and the rest just use the activeModelAdapter. This can be done pretty easy by placing an adapter file into each model folder, but I am wondering if there is a better way, like the application adapter which sets the default, but for pod a folder? We also need to use serializers for each model, which should also use a default serializer, but current has to be placed in every single model folder. I hope I could explain this good enough.

Cheers Thomas

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles