Skip to content

Instantly share code, notes, and snippets.

@gone
Created September 17, 2014 05:06
Show Gist options
  • Save gone/a26bbea782f88282c64c to your computer and use it in GitHub Desktop.
Save gone/a26bbea782f88282c64c to your computer and use it in GitHub Desktop.
import DS from 'ember-data';
import FIXTURES from '../fixtures/condition';
var Condition = DS.Model.extend({
commonName: DS.attr("string"),
scientificName: DS.attr("string"),
description: DS.attr("string"),
percentMatch: DS.attr("integer"),
commonality: DS.attr("string"),
urgency: DS.attr("string"),
facilityTypeConditions: DS.hasMany("facilityTypeCondition"),
facilityTypeReccomendations: function(){
this.get("facilityTypeConditions").sort("order").getProperty("facilityType")
}.property("facilityTypeConditions.@each")
});
Condition.reopenClass({
FIXTURES: FIXTURES
});
export default Condition;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment