title: Ember get the JSON response of a POST request
body: <p>I have a Ruby On Rails API and a front end in ember apart.
  I'm trying to add a record from ember to my api. I can see in my api logs that my request is well executed and return a json. But in my ember app i try to print that JSON response and access to those informations..</p>
  
  <p>here's the code from my controller to create a record from my ember app :</p>
  
  <pre><code>export default Ember.Controller.extend({
    actions: {
  
      submit: function(){
        var result = this.store.createRecord("session", {email: this.get('email'), password: this.get('password')});
        var onSuccess =  function(post){
  
          console.log("kikou");
          console.log(post);
        };
  
        var onFail =  function(post){
          console.log("kikou");
          console.log(post);
        };
  
        result.save().then(onSuccess, onFail);
      }
    }
  </code></pre>
  
  <p>the JSON returned is : </p>
  
  <pre><code>{"user":{"email":"gui@hotmail.com","authentication_token":"4vLAkiM1Ro5qN2HeNogM","id":1}}
  </code></pre>
  
  <p>How can I access to email, authentication_token etc...?
  Maybe I'm doing something wrong or it is not the proper way to create a record on my rails api?</p>
  
  <p>I do not want to make any ajax code in my controller otherwise I do not see any interest to use Ember.</p>
  
  <p>Thank you for your help,</p>