title: Ember.js: Check if a record already exists in model ( Error - the adapter's response did not have any data)
body: <p>What I'm trying to do:
  User will get error if user trying to register with username or email that are already registered in model. </p>
  
  <p>When I tried to register with username(id) that is not registered, I got this error:
  <strong><code>Error: Assertion Failed: You made a request for a user with id kevin, but the adapter's response did not have any data</code></strong> 
  I'm debugging with console and reading documentation but I'm not sure why I get this error, please help me.</p>
  
  <p>in the controller <strong><code>app/auth/register.js</code></strong></p>
  
  <pre><code>var AuthRegisterController = Ember.ObjectController.extend({
    name:     null,
    username: null,
    email:    null,
    password: null,
    error:    null,
  
    actions: {
      register: function(){
        this.set('error', null);
        var userInfo = this.getProperties('name', 'username', 'email', 'password');
  
        ...
  
        if(this.store.find('user', userInfo.username)){
          return this.set('error', 'The username is already registered.');
        }
        if(this.store.find('user', {email: userInfo.email})){
          return this.set('error', 'The email is already registered.');
        }
  
        ...
  
      }
    }
  
  });
  
  export default AuthRegisterController;
  </code></pre>
  
  <p>User model structure : <strong><code>app/models/user.js</code></strong></p>
  
  <pre><code>var User = DS.Model.extend({
    name: DS.attr('string'),
    email: DS.attr('string'),
    password: DS.attr('string'),
    posts: DS.hasMany('post'),
  });
  
  User.reopenClass({
    FIXTURES: [{
      id: 'will',
      name: 'Will Smith',
      email: 'will@example.com',
      password: 'password'
    }]
  });
  
  export default User;
  </code></pre>
  
  <p><a href="http://emberjs.com/guides/models/finding-records/" rel="nofollow">Ember documentation - Finding Records</a></p>