{"action":"closed","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/122","repository_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project","labels_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/122/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/122/events","html_url":"https://github.com/ga-wdi-boston/capstone-project/issues/122","id":146348542,"number":122,"title":"Problem creating prompt_responses after adding Ember associations","user":{"login":"jpfriedman18","id":11454266,"avatar_url":"https://avatars.githubusercontent.com/u/11454266?v=3","gravatar_id":"","url":"https://api.github.com/users/jpfriedman18","html_url":"https://github.com/jpfriedman18","followers_url":"https://api.github.com/users/jpfriedman18/followers","following_url":"https://api.github.com/users/jpfriedman18/following{/other_user}","gists_url":"https://api.github.com/users/jpfriedman18/gists{/gist_id}","starred_url":"https://api.github.com/users/jpfriedman18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpfriedman18/subscriptions","organizations_url":"https://api.github.com/users/jpfriedman18/orgs","repos_url":"https://api.github.com/users/jpfriedman18/repos","events_url":"https://api.github.com/users/jpfriedman18/events{/privacy}","received_events_url":"https://api.github.com/users/jpfriedman18/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-06T15:24:22Z","updated_at":"2016-04-06T16:25:00Z","closed_at":"2016-04-06T16:25:00Z","body":"On my front end I have associated prompts and prompt_responses:\r\n\r\n```\r\nexport default DS.Model.extend({\r\n  text: DS.attr('string'),\r\n  prompt: DS.belongsTo('prompt', {async: true})\r\n});\r\n```\r\n\r\n```\r\nexport default DS.Model.extend({\r\n  title: DS.attr('string'),\r\n  text: DS.attr('string'),\r\n  promptResponses: DS.hasMany('prompt-response', {async: true})\r\n});\r\n```\r\n\r\nHowever, now when I try to create a new prompt_response, the prompt_id is not being passed to the backend correctly, and in the server logs the parameters for the POST action are:\r\n\r\n```\r\nParameters: {\"prompt_response\"=>{\"text\"=>\"asdgdfgsdafasdfsdaf\", \"prompt_id\"=>nil}}\r\n```\r\n\r\nHowever, I checked to see the values of the promptResponse object being passed into the createPromptResponse action and it includes the prompt_id:\r\n\r\n```\r\ncreatePromptResponse: function(promptResponse){\r\n      console.log(promptResponse);\r\n      this.store.createRecord('prompt_response', promptResponse)\r\n        .save().then(()=>console.log('response created'))\r\n        .then(()=> this.transitionTo('student-landing'));\r\n    }\r\n```\r\n\r\nin console:\r\n\r\n```\r\nprompt_id: \"10\"\r\ntext: \"asdgdfgsdafasdfsdaf\"\r\n```\r\n\r\nNot sure of why prompt_id isn't being passed to backend. It was working before the Ember associations were added."}}