all files / app/pods/city/ controller.js

100% Statements 27/27
100% Branches 12/12
100% Functions 6/6
100% Lines 3/3
1 statement, 4 branches Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58                                                                                                               
import Controller from 'ember-controller'
import computed from 'ember-computed-decorators'
import service from 'ember-service/inject'
 
 
 
export default Controller.extend({
 
  // ----- Services -----
  fastboot: service(),
 
 
 
  // ----- Overridden properties -----
 
 
 
  // ----- Static properties -----
  distanceLimitKm: 100,
 
 
 
  // ----- Computed properties -----
  @computed    ('[email protected]')
  maxDistanceLimitKm (userCityJunctions) {
    return 1 +
      userCityJunctions
        .sortBy('distanceKm')
        .get('lastObject.distanceKm')
  },
 
 
 
  // ----- Overridden Methods -----
 
 
 
  // ----- Custom Methods -----
 
 
 
  // ----- Events and observers -----
 
 
 
  // ----- Tasks -----
 
 
 
  // ----- Actions -----
  actions: {
    changeCityAction (cityId) {
      this.transitionToRoute('city', cityId)
    }
  }
})