title: Struggling with sorting data in ember
body: <p>I have an ember route that gets the following data:</p>
  
  <pre><code>return this.store.findAll('servicerequest');
  </code></pre>
  
  <p>One of the fields is a date field called created_at that I am trying to sort by.</p>
  
  <p>Here is my servicerequest controller:</p>
  
  <pre><code>    import Controller from '@ember/controller';
      import { sort } from '@ember/object/computed';
  
      export default Controller.extend({
         appName: 'Service Requests',
         sortAscending: false,
         sortDefinition: ['created_at:desc'],
         sortedRequests: sort('servicerequest', 'sortDefinition')
      });
  </code></pre>
  
  <p>Here is the hbs section where I am outputting the data:</p>
  
  <pre><code>      {{#each sortedRequests as |servicerequest|}}
          {{servicerequest-list status=servicerequest.status srdescription=servicerequest.srdescription priority=servicerequest.priority created_at=servicerequest.created_at
            current_user_id=servicerequest.current_user_id servicerequestId=servicerequest.id}}
        {{/each}}
  </code></pre>
  
  <p>I have not been able to get anything to sort by the created_at field desc. What am I doing wrong?</p>
  
  <p>UPDATE: </p>
  
  <p>Here is my model:</p>
  
  <pre><code>    import DS from 'ember-data';
  
      export default DS.Model.extend({
        requester_name: DS.attr('string'),
        srdescription: DS.attr('string'),
        priority: DS.attr('string'),
        status: DS.attr('string'),
        created_at: DS.attr('date'),
        current_user_id: DS.attr()
      });
  </code></pre>
  
  <p>The data is coming from a rails api. The created_at field is what the systems defaults to on records that is why there is an underscore. </p>
  
  <p>I am using ember-cli: 3.0.2</p>