{"action":"opened","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/384","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/384/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/384/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/384/events","html_url":"https://github.com/ga-wdi-boston/capstone-project/issues/384","id":200881737,"number":384,"title":"Ember sending blank object to Express","user":{"login":"coffeeisamazing","id":14969865,"avatar_url":"https://avatars.githubusercontent.com/u/14969865?v=3","gravatar_id":"","url":"https://api.github.com/users/coffeeisamazing","html_url":"https://github.com/coffeeisamazing","followers_url":"https://api.github.com/users/coffeeisamazing/followers","following_url":"https://api.github.com/users/coffeeisamazing/following{/other_user}","gists_url":"https://api.github.com/users/coffeeisamazing/gists{/gist_id}","starred_url":"https://api.github.com/users/coffeeisamazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coffeeisamazing/subscriptions","organizations_url":"https://api.github.com/users/coffeeisamazing/orgs","repos_url":"https://api.github.com/users/coffeeisamazing/repos","events_url":"https://api.github.com/users/coffeeisamazing/events{/privacy}","received_events_url":"https://api.github.com/users/coffeeisamazing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-15T17:27:47Z","updated_at":"2017-01-15T17:27:47Z","closed_at":null,"body":"I'm trying to create a new \"Shop\" from my Ember Front-End. I have a shops controller that is working fine via curl requests on my express back-end. I tried adding a console.log but looks like the back-end is receiving empty shop objects from Ember (shop {}). Not sure why the data is not being sent, as I'm able to see the yelp_id on the shop object from console log prior to calling save.\r\n\r\n**components/create-shop/component.js**\r\n```js\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.Component.extend({\r\n  shop: {},\r\n  actions: {\r\n    save () {\r\n      console.log(\"create/shop\", this.get('shop'));\r\n      this.sendAction('save', this.get('shop'));\r\n    },\r\n    cancel () {\r\n      this.sendAction('cancel', this.get('shop'));\r\n    },\r\n  },\r\n});\r\n```\r\n**components/create-shop/template.hbs**\r\n```js\r\n<form {{action 'save' on='submit'}}>\r\n  {{input placeholder='Yelp ID' value=shop.yelp_id}}\r\n  <button type='submit' class='btn btn-xs'>Save</button>\r\n  <button {{action 'cancel'}} class='btn btn-xs btn-danger'>Cancel</button>\r\n</form>\r\n```\r\n**shops/new/route.js**\r\n```js\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.Route.extend({\r\n  model () {\r\n    return this.get('store').createRecord('shop', {});\r\n  },\r\n  actions: {\r\n    createShop (shop) {\r\n      shop.save();\r\n      console.log(\"create\", shop);\r\n    },\r\n    cancelCreateShop (shop) {\r\n      console.log(\"cancel\");\r\n      shop.rollbackAttributes();\r\n    },\r\n  },\r\n});\r\n```\r\n**shops/new/template.hbs**\r\n```js\r\nhannaford-portland-3\r\n{{create-shop\r\n  shop=model\r\n  save='createShop'\r\n  cancel='cancelCreateShop'}}\r\n```\r\n"}}
{"actor":{"display_login":"coffeeisamazing"}}