mercredi 27 juillet 2016

Error :While rendering the RSolr::HashWithResponse from rails controller + ember

hi all i am bit new with ember, i am getting this error

Error: Assertion Failed: Encountered a resource object with an undefined type (resolved resource using ui@serializer:application:) at new Error (native)

while rendering my rsolar responce.

Can any one guide us in which format we should render.

ember model:

export default Model.extend({
      title_s: attr()
 });


ember controller:


var resu = this.get('store').findAll('search')

data which i have to render in rails controller is like this :

 {"responseHeader"=>{"status"=>0, "QTime"=>0, "params"=>{"q"=>"*:*", "wt"=>"ruby"}},
 "response"=>
  {"numFound"=>6,
   "start"=>0,
   "docs"=>
    [ 
     {"id"=>"1",
      "title_s"=>"java se",
      "title_txt"=>["java se"],
      "company_name_s"=>"cts",
      "company_name_txt"=>["cts"],
      "job_description_s"=>"it",
      "job_description_txt"=>["it"],
      "category_name_s"=>"it",
      "industry_s"=>"it",
      "created_at_s"=>"10-05-16",
      "job_type_s"=>"permenant",
      "city_s"=>"delhi",
      "state_s"=>"delhi",
      "salary_type_s"=>"monthly",
      "salary_s"=>"100000",
      "status_b"=>true,
      "_version_"=>1540288621613940736
     }
    ]
  }
}

please help me out.

thanks in advance




Aucun commentaire:

Enregistrer un commentaire