{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/195","repository_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project","labels_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/195/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/195/events","html_url":"https://github.com/ga-wdi-boston/full-stack-project/issues/195","id":137696637,"number":195,"title":"creating new instance doesn't save all data attributes (just one of two)","user":{"login":"apalmer0","id":6477457,"avatar_url":"https://avatars.githubusercontent.com/u/6477457?v=3","gravatar_id":"","url":"https://api.github.com/users/apalmer0","html_url":"https://github.com/apalmer0","followers_url":"https://api.github.com/users/apalmer0/followers","following_url":"https://api.github.com/users/apalmer0/following{/other_user}","gists_url":"https://api.github.com/users/apalmer0/gists{/gist_id}","starred_url":"https://api.github.com/users/apalmer0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apalmer0/subscriptions","organizations_url":"https://api.github.com/users/apalmer0/orgs","repos_url":"https://api.github.com/users/apalmer0/repos","events_url":"https://api.github.com/users/apalmer0/events{/privacy}","received_events_url":"https://api.github.com/users/apalmer0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-03-01T21:48:16Z","updated_at":"2016-03-02T00:28:20Z","closed_at":null,"body":"I created a 'Bulletin' model that has 2 attributes: content and a gym_id. When I create a bulletin, only one attribute is saved.\r\n\r\n**bulletins#create**\r\n```ruby\r\n  def create\r\n    @bulletin = Bulletin.new(bulletin_params)\r\n\r\n    if @bulletin.save\r\n      render json: @bulletin, status: :created\r\n    else\r\n      render json: @bulletin.errors, status: :unprocessable_entity\r\n    end\r\n  end\r\n```\r\n**bulletin_params**\r\n```ruby\r\n  def bulletin_params\r\n    params.require(:bulletin).permit(:content, :gym_id)\r\n  end\r\n  private :bulletin_params\r\n```\r\n\r\n**the form for actually creating the bulletin**\r\n```html\r\n <form id=\"new-bulletin\">\r\n        <input type=\"text\" class=\"form-control\" id=\"inputBulletinContent\" placeholder=\"content\" name=\"bulletin[content]\" value=\"\">\r\n        <input type=\"hidden\" class=\"form-control\" id=\"inputBulletinGymId\" name=\"bulletin[gym_id]\" value=\"{{gymId}}\">\r\n        <div class=\"modal-footer\">\r\n          <button type=\"submit\" name=\"submit\" class=\"btn btn-success create-bulletin-button\" data-gym-id=\"{{gymId}}\">Create Bulletin</button>\r\n        </div>\r\n      </form>\r\n```\r\n\r\n**the error i get**\r\n```ruby\r\nStarted POST \"/gyms/1/bulletins\" for ::1 at 2016-03-01 16:28:41 -0500\r\nProcessing by BulletinsController#create as */*\r\n  Parameters: {\"gym_id\"=>\"1\"}\r\n  User Load (0.9ms)  SELECT  \"users\".* FROM \"users\" WHERE \"users\".\"token\" = $1 LIMIT 1  [[\"token\", \"6f4ac0b5de73dfccbcf902375c763764\"]]\r\nCompleted 400 Bad Request in 5ms (ActiveRecord: 0.9ms)\r\n\r\nActionController::ParameterMissing (param is missing or the value is empty: bulletin):\r\n  app/controllers/bulletins_controller.rb:42:in `bulletin_params'\r\n  app/controllers/bulletins_controller.rb:14:in `create'\r\n```"},"comment":{"url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/comments/190987331","html_url":"https://github.com/ga-wdi-boston/full-stack-project/issues/195#issuecomment-190987331","issue_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/195","id":190987331,"user":{"login":"apalmer0","id":6477457,"avatar_url":"https://avatars.githubusercontent.com/u/6477457?v=3","gravatar_id":"","url":"https://api.github.com/users/apalmer0","html_url":"https://github.com/apalmer0","followers_url":"https://api.github.com/users/apalmer0/followers","following_url":"https://api.github.com/users/apalmer0/following{/other_user}","gists_url":"https://api.github.com/users/apalmer0/gists{/gist_id}","starred_url":"https://api.github.com/users/apalmer0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apalmer0/subscriptions","organizations_url":"https://api.github.com/users/apalmer0/orgs","repos_url":"https://api.github.com/users/apalmer0/repos","events_url":"https://api.github.com/users/apalmer0/events{/privacy}","received_events_url":"https://api.github.com/users/apalmer0/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T00:28:20Z","updated_at":"2016-03-02T00:28:20Z","body":"Sorry - this ends up refreshing the page again"}}