Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4831

Ember 3.4 and pluralize

$
0
0

@GELight wrote:

Hi there,

Feels very good to work with ember again. :slight_smile:

I have to migrate a v2.13 application to Ember v3.4. I generated a new app based on 3.4 and no I try to add all artifacts step by step.

I have 2 Questions so far:

  1. Where or in which package is the old pluralize() method placed?
  2. Where I have to place my adapter classes now?

This is my old adapter:

import Ember from 'ember';
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
    
    urlForFindAll(modelName/*, snapshot*/) {
        let baseUrl = this.buildURL();
        return baseUrl + '/rest/' + Ember.String.pluralize(modelName) + '.json';
    },
    
    urlForFindRecord(id, modelName/*, snapshot*/) {
        let baseUrl = this.buildURL();
        return baseUrl + '/rest/' + Ember.String.pluralize(modelName) + '/' + id + '.json';
    }
    
});

Best regards, Mario

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4831

Trending Articles