{"action":"opened","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/302","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/302/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/302/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/capstone-project/issues/302/events","html_url":"https://github.com/ga-wdi-boston/capstone-project/issues/302","id":187812500,"number":302,"title":"Delete button not working","user":{"login":"rosmith76","id":20599957,"avatar_url":"https://avatars.githubusercontent.com/u/20599957?v=3","gravatar_id":"","url":"https://api.github.com/users/rosmith76","html_url":"https://github.com/rosmith76","followers_url":"https://api.github.com/users/rosmith76/followers","following_url":"https://api.github.com/users/rosmith76/following{/other_user}","gists_url":"https://api.github.com/users/rosmith76/gists{/gist_id}","starred_url":"https://api.github.com/users/rosmith76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosmith76/subscriptions","organizations_url":"https://api.github.com/users/rosmith76/orgs","repos_url":"https://api.github.com/users/rosmith76/repos","events_url":"https://api.github.com/users/rosmith76/events{/privacy}","received_events_url":"https://api.github.com/users/rosmith76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T20:02:02Z","updated_at":"2016-11-07T20:02:02Z","closed_at":null,"body":"I looked at issue 298, and it was helpful. I am further than I was before I looked at it. \r\nI don't think I am targeting what I want with the delete button.\r\nError message\r\n```\r\nroute.js:14 Uncaught TypeError: this.sendAction is not a function(…)\r\n```\r\nbike route.js I am not seeing this console log\r\n```\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.Route.extend({\r\n  model (params) {\r\n    return this.get('store').findRecord('bike', params.bike_id);\r\n  },\r\n\r\n  actions: {\r\n    edit (bike) {\r\n      this.transitionTo('bike.edit', bike);\r\n    },\r\n        deleteBike (bike, params) {\r\n          console.log('getting to destroyBike');\r\n          console.log(bike);\r\n          bike.destroyRecord('bike', params.bike_id);\r\n          this.transitionTo('bikes');\r\n      },\r\n},\r\n});\r\n```\r\nbike template\r\n```\r\n{{my-bike bike=model deleteBike='deleteBike' edit='edit'}}\r\n```\r\nbikes route.js I do see this console log. The error points to line 14 here.\r\n```\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.Route.extend({\r\n  model () {\r\nreturn this.get('store').findAll('bike');\r\n},\r\n\r\ntagName: 'li',\r\n\r\nbike: {},\r\nactions: {\r\n  delete () {\r\n    console.log('getting to the delete action in bikes component');\r\n    console.log(this.get('bike'));\r\n    this.sendAction('delete', this.get('bike'));\r\n  },\r\n},\r\n\r\n});\r\n```\r\nbikes template The delete button is right next to the bike link. This is how I want to delete a bike\r\n```\r\n<h2>Bikes</h2>\r\n\r\n<ul>\r\n{{#each model as |bike|}}\r\n  <li>{{#link-to 'bike' bike}}{{bike.name}}{{/link-to}}\r\n  {{bike/my-bike bike=bike delete='deleteBike'}}\r\n    Delete\r\n  </button>\r\n  </li>\r\n{{/each}}\r\n```\r\nmy-bike component.js file \r\n```\r\nimport Ember from 'ember';\r\n\r\nexport default Ember.Component.extend({\r\n  delete () {\r\n  return this.sendAction('deleteBike', this.get('bike'));\r\n},\r\n});\r\n```"}}
{"actor":{"display_login":"rosmith76"}}