{"action":"created","issue":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/316","repository_url":"https://api.github.com/repos/ga-wdi-exercises/project4","labels_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/316/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/316/comments","events_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/316/events","html_url":"https://github.com/ga-wdi-exercises/project4/issues/316","id":177172968,"number":316,"title":"Odd posting issue","user":{"login":"ahmedelk91","id":19919369,"avatar_url":"https://avatars.githubusercontent.com/u/19919369?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmedelk91","html_url":"https://github.com/ahmedelk91","followers_url":"https://api.github.com/users/ahmedelk91/followers","following_url":"https://api.github.com/users/ahmedelk91/following{/other_user}","gists_url":"https://api.github.com/users/ahmedelk91/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmedelk91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmedelk91/subscriptions","organizations_url":"https://api.github.com/users/ahmedelk91/orgs","repos_url":"https://api.github.com/users/ahmedelk91/repos","events_url":"https://api.github.com/users/ahmedelk91/events{/privacy}","received_events_url":"https://api.github.com/users/ahmedelk91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-15T13:14:40Z","updated_at":"2016-09-15T13:20:04Z","closed_at":null,"body":"Hello again! \r\n\r\nI am having an issue when creating a new user. I am unable to create a new user on one click. When I click once, I get the following error in my console: \r\n\r\n![screen shot 2016-09-15 at 9 08 06 am](https://cloud.githubusercontent.com/assets/19919369/18550871/fad6c168-7b23-11e6-8fee-bc693484f723.png)\r\n\r\nand an error in my terminal/server: \r\n\r\n![screen shot 2016-09-15 at 9 09 23 am](https://cloud.githubusercontent.com/assets/19919369/18550905/26588682-7b24-11e6-9360-e6a0e2733756.png)\r\n\r\nHowever, if I click to create three times in a row, the new user will be created. I get no error in the console and my server reads successfully. \r\n\r\n![screen shot 2016-09-15 at 9 11 11 am](https://cloud.githubusercontent.com/assets/19919369/18550955/64b55dd8-7b24-11e6-94a5-391cb31bb745.png)\r\n\r\nMy server is saying the problem lies with the following code in my user_controller in my rails API: \r\n\r\n```\r\n  def create\r\n    @user = User.new(user_params)\r\n\r\n    if @user.save\r\n      render json: @user, status: :created, location: @user\r\n    else\r\n      render json: @user.errors, status: :unprocessable_entity\r\n    end\r\n  end \r\n```\r\n\r\nThis issue appeared after attempting self referential associations. Any help would be greatly appreciated. Thanks!  "},"comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/comments/247325728","html_url":"https://github.com/ga-wdi-exercises/project4/issues/316#issuecomment-247325728","issue_url":"https://api.github.com/repos/ga-wdi-exercises/project4/issues/316","id":247325728,"user":{"login":"andrewsunglaekim","id":8976305,"avatar_url":"https://avatars.githubusercontent.com/u/8976305?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewsunglaekim","html_url":"https://github.com/andrewsunglaekim","followers_url":"https://api.github.com/users/andrewsunglaekim/followers","following_url":"https://api.github.com/users/andrewsunglaekim/following{/other_user}","gists_url":"https://api.github.com/users/andrewsunglaekim/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsunglaekim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsunglaekim/subscriptions","organizations_url":"https://api.github.com/users/andrewsunglaekim/orgs","repos_url":"https://api.github.com/users/andrewsunglaekim/repos","events_url":"https://api.github.com/users/andrewsunglaekim/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsunglaekim/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T13:20:04Z","updated_at":"2016-09-15T13:20:04Z","body":"Thats weird your getting a primary key error on create .. It happens every time like that? Failure twice then success on third?"}}
{"actor":{"display_login":"andrewsunglaekim"}}