@Ayoros_42 wrote:
Hi,
I'm in trouble with my model,
answer-group.js
import DS from 'ember-data'; export default DS.Model.extend({ candidacy: DS.belongsTo('candidacy'), survey: DS.belongsTo('survey'), candidacy_answers: DS.hasMany('candidacy-answer') });
When i save my object the request to my api is like this:
POST "https://blabla.bla/answerGroups" Parameters: {"answerGroup"=>{"candidacy"=>nil, "survey"=>"1"}, "answer_group"=>{}}
I update my RESTadapter with:
pathForType: function(type) { return Ember.String.pluralize(Ember.String.underscore(type)); },
Now, my uri is formatted correctly:
POST "https://blabla.bla/answer_groups" Parameters: {"answerGroup"=>{"candidacy"=>nil, "survey"=>"1"}, "answer_group"=>{}}
My query params still in camelcase, how can i keep the snake_case ?
Posts: 1
Participants: 1