{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/32","labels_url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/32/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/32/events","html_url":"https://github.com/ga-wdi-boston/portfolio-capstone-project/issues/32","id":122349526,"number":32,"title":"Form data not submitting correctly","user":{"login":"HoldenMills","id":13193297,"avatar_url":"https://avatars.githubusercontent.com/u/13193297?v=3","gravatar_id":"","url":"https://api.github.com/users/HoldenMills","html_url":"https://github.com/HoldenMills","followers_url":"https://api.github.com/users/HoldenMills/followers","following_url":"https://api.github.com/users/HoldenMills/following{/other_user}","gists_url":"https://api.github.com/users/HoldenMills/gists{/gist_id}","starred_url":"https://api.github.com/users/HoldenMills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoldenMills/subscriptions","organizations_url":"https://api.github.com/users/HoldenMills/orgs","repos_url":"https://api.github.com/users/HoldenMills/repos","events_url":"https://api.github.com/users/HoldenMills/events{/privacy}","received_events_url":"https://api.github.com/users/HoldenMills/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-15T19:39:20Z","updated_at":"2015-12-15T22:05:10Z","closed_at":null,"body":"I am trying to generate a new Future Trip list.  The parameters for my future_trips_controller are \r\n```ruby\r\ndef future_trip_params\r\n    params.require(:future_trip_params).permit(\r\n                                        :park_id,\r\n                                        :reason,\r\n                                        :date_end,\r\n                                        :date_begin\r\n    )\r\n  end\r\n```\r\n\r\nAfter logging in, I submit the form;\r\n\r\n```html\r\n<form id=\"newFuture\" hidden>\r\n        <select class=\"dropdown\" name=\"park_id\">\r\n          <script id=\"allParks\" type=\"text/x-handlebars-template\">\r\n            {{#each park}}\r\n              <option value={{id}}>{{name}}</option>\r\n            {{/each}}\r\n          </script>\r\n        </select>\r\n        <input name=\"reason\" type=\"text\" value=\"\" size=\"30\" placeholder=\"Why do you want to go here?\">\r\n        <input name=\"date_begin\" type=\"text\" size=\"30\" value=\"\" placeholder=\"When will your trip start?\">\r\n        <input name=\"date_end\" type=\"text\" size=\"30\" value=\"\" placeholder=\"When will your trip end?\">\r\n        <input id=\"futureList\" type=\"submit\" size=\"30\" value=\"futureList\">\r\n      </form>\r\n```\r\nMy api request is;\r\n\r\n```javascript\r\nnewFutureTrip: function newFutureList(future_trip_params, callback) {\r\n    this.ajax({\r\n      method: 'POST',\r\n      // url: 'http://httpbin.org/post',\r\n      url: this.url + '/future_trips',\r\n      contentType: 'application/json; charset=utf-8',\r\n      data: JSON.stringify(future_trip_params),\r\n      dataType: 'json',\r\n      headers: {\r\n        Authorization: \"Token token=\" + token\r\n      }\r\n    }, callback);\r\n  }\r\n```\r\n\r\nmy callback is;\r\n```javascript\r\nnewFutureTripCB: function(err, data) {\r\n    if (err) {\r\n      console.log(err);\r\n    } else {\r\n      console.log('working',data);\r\n    }\r\n  },\r\n```\r\nMy click handler;\r\n```javascript\r\n$('#newFuture').on('submit', function(e){\r\n    var future_trip_params = wrap('future_trip_params', form2object(this));\r\n    api.newFutureTrip(future_trip_params, cb.newFutureTripCB);\r\n    e.preventDefault();\r\n  });\r\n```\r\n\r\nWhen I submit the form, I get this error message in the rails server;\r\n\r\nArgumentError (too few arguments):\r\n  app/controllers/future_trips_controller.rb:10:in `format'\r\n  app/controllers/future_trips_controller.rb:10:in `create'\r\n\r\nIn the chrome console under the Request Payload I am seeing;\r\n future_trip_params: {park_id: \"8\", reason: \"It's nice\", date_begin: \"2015-12-23\", date_end: \"2015-12-24\"}\r\n\r\nSo I would think that it is grabbing the information but for some reason it's not registering them."},"comment":{"url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/comments/164912392","html_url":"https://github.com/ga-wdi-boston/portfolio-capstone-project/issues/32#issuecomment-164912392","issue_url":"https://api.github.com/repos/ga-wdi-boston/portfolio-capstone-project/issues/32","id":164912392,"user":{"login":"HoldenMills","id":13193297,"avatar_url":"https://avatars.githubusercontent.com/u/13193297?v=3","gravatar_id":"","url":"https://api.github.com/users/HoldenMills","html_url":"https://github.com/HoldenMills","followers_url":"https://api.github.com/users/HoldenMills/followers","following_url":"https://api.github.com/users/HoldenMills/following{/other_user}","gists_url":"https://api.github.com/users/HoldenMills/gists{/gist_id}","starred_url":"https://api.github.com/users/HoldenMills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HoldenMills/subscriptions","organizations_url":"https://api.github.com/users/HoldenMills/orgs","repos_url":"https://api.github.com/users/HoldenMills/repos","events_url":"https://api.github.com/users/HoldenMills/events{/privacy}","received_events_url":"https://api.github.com/users/HoldenMills/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T22:05:09Z","updated_at":"2015-12-15T22:05:09Z","body":"After doing that change I'm getting \r\n\r\nNameError (undefined local variable or method `future_trip' for #<FutureTripsController:0x007fb08f26baa0>):\r\n  app/controllers/future_trips_controller.rb:4:in `create' \r\n"}}