Post json data and saving data to Data Base in ember

Hello there , I am trying to post data as well as to save it in Database , but It seems that I am stuck very hard this time ,So please help me to get over this ,Thanks in advance

My Code in app.js

 var App = Ember.Application.create(); {
     this.resource('persons', function() {
        this.resource('data', { path: ':person_id' });

    App.Store = DS.Store.extend({
     revision: 12, 
     adapter: DS.RESTAdapter.extend({
      url: 'http://port/path_to_save_data' 


    App.PersonsRoute = Ember.Route.extend({
     model: function() {

    App.Person = DS.Model.extend({  
      name: DS.attr('string'),
      file: DS.attr('string')

    App.DataController = Ember.ObjectController.extend({
      isEditing: false,

      edit: function() {
        this.set('isEditing', true);


      doneEditing: function() {
        this.set('isEditing', false);
        var record = this.get('store').createRecord('persons', {
            name: 'Rails is Omakase',
            file: 'Lorem ipsum'

Complete Code in index.html is

  <meta charset="utf-8">
  <title>Ember Starter Kit</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/style.css">
    <link href="" rel="stylesheet">

  <script type="text/x-handlebars" id="blogger">
    <h2>Here in Blogger</h2>

    <script type="text/x-handlebars">
      <div class="navbar">
        <div class="navbar-inner">
         <ul class="nav">
            <li>{{#link-to 'persons'}}Person{{/link-to}}</li>
            <li>{{#link-to 'about'}}About{{/link-to}}</li>


   <script type="text/x-handlebars" id="persons">
      <div class="container-fluid">
        <div class="row-fluid">
          <div class="span3">
            <table class='table'>
                <tr><th>Recent Posts </th></tr>
               {{#each model}}
               {{#link-to 'data' this}} {{name}}{{/link-to}}
          <div class="span9">

  <script type="text/x-handlebars" id="data">
       {{#if isEditing}}
        {{partial 'data/edit'}}
        <button {{action 'doneEditing'}}>Done</button>
        <button {{action 'edit'}}>Edit</button>

      <div class='below-the-fold'>

   <script type="text/x-handlebars" id="data/_edit">
   <p class="text-warning">Please select a post</p>
      <p>{{view Ember.TextField valueBinding = 'name'}}</p>
      <p>{{view Ember.TextField valueBinding = 'file'}}</p>

  <script type="text/x-handlebars" id="about">
      <p>in about route</p>

    <script src="js/libs/jquery-1.10.2.js"></script>
    <script src="js/libs/handlebars-1.1.2.js"></script>
    <script src="js/libs/ember-1.5.1.js"></script>
    <script src="js/bower_components/ember-data/ember-data.js"></script>
    <script src="js/app.js"></script>
    <script src=""></script>
    <script src=""></script>
    <!-- to activate the test runner, add the "?test" query string parameter -->
    <script src="tests/runner.js"></script>


And the code that I am trying to save data from is

  pattern:  /test/ember/persons/{id}
  defaults: { _controller: TestDefaultDirTestBundle:Default:save }

Action for this route is :

public function saveAction(Request $request)
	$em = $this->getDoctrine()->getEntityManager();

	if ($request->isMethod('POST'))
		$jsonData = $request->get('jsonData');
		$serializer = $this->get('serializer');
		$persons = $serializer->deserialize($jsonData, 'TestDefaultDir\TestBundle\WSClasses\Persons', 'json');

		foreach ($persons->persons as $p)
			$person = new Person();


Please let me know where I am lacking,