How to use the active-model-adapter.ActiveModelSerializer function in active-model-adapter

To help you get started, we’ve selected a few active-model-adapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danielspaniel / ember-data-factory-guy / addon / builder / fixture-builder-factory.js View on Github external
import require from 'require';
import DS from 'ember-data';
import JSONAPIFixtureBuilder from './jsonapi-fixture-builder';
import RESTFixtureBuilder from './rest-fixture-builder';
import JSONFixtureBuilder from './json-fixture-builder';
import DRFFixtureBuilder from './drf-fixture-builder';
import ActiveModelFixtureBuilder from './active-model-fixture-builder';

let ActiveModelSerializer, DjangoSerializer;
try {
  let activeModel = require('active-model-adapter');
  ActiveModelSerializer = activeModel.ActiveModelSerializer;
} catch (e) {
  // do nothing
}

try {
  let drf = require('ember-django-adapter/serializers/drf');
  DjangoSerializer = drf && drf.default;
} catch (e) {
  // do nothing
}

export default class {

  constructor(store) {
    this.store = store;
  }

active-model-adapter

Adapters and Serializers for Rails's ActiveModel::Serializers

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis