{"action":"created","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/481","repository_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/481/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/481/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/481","id":123305021,"number":481,"title":"@resource.allow_password_change is not persisted across requests","user":{"login":"Chosko","id":3297850,"avatar_url":"https://avatars.githubusercontent.com/u/3297850?v=3","gravatar_id":"","url":"https://api.github.com/users/Chosko","html_url":"https://github.com/Chosko","followers_url":"https://api.github.com/users/Chosko/followers","following_url":"https://api.github.com/users/Chosko/following{/other_user}","gists_url":"https://api.github.com/users/Chosko/gists{/gist_id}","starred_url":"https://api.github.com/users/Chosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chosko/subscriptions","organizations_url":"https://api.github.com/users/Chosko/orgs","repos_url":"https://api.github.com/users/Chosko/repos","events_url":"https://api.github.com/users/Chosko/events{/privacy}","received_events_url":"https://api.github.com/users/Chosko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-21T16:00:06Z","updated_at":"2016-02-08T09:54:52Z","closed_at":null,"body":"My application is set to require current_password when users want to change their password.\r\nThe problem is when an user wants to reset the password. After the mail is sent and the user is prompted to insert the new password, the server returns 422 with the error: \"current_password can't be blank\".\r\n\r\nI'm using v0.1.37.beta4, and this version contains a pull request: https://github.com/lynndylanhurley/devise_token_auth/commit/d33bcdb5bae993bd4ba8134b52486c8b6cce2908\r\nwhich is supposed to fix this problem, but it doesn't.\r\n\r\nI guess the problem here is that @resource.allow_password change is set to true in projects_controller#edit but it's not persisted to the DB, and in the next call (projcets_controller#update) its value is false again.\r\n\r\nI made a quick and dirty fix to store allow_password to the DB, though I'm not sure it's a good solution because this means changing the generators too....\r\nI don't have the time to implement tests, so I didn't even open the PR. However, you can see the changes here https://github.com/Chosko/devise_token_auth/commit/e3a4d3d888547662352c8bc4568ddab6b84ac259.\r\n"},"comment":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/comments/181282469","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/481#issuecomment-181282469","issue_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/481","id":181282469,"user":{"login":"paulius005","id":3084367,"avatar_url":"https://avatars.githubusercontent.com/u/3084367?v=3","gravatar_id":"","url":"https://api.github.com/users/paulius005","html_url":"https://github.com/paulius005","followers_url":"https://api.github.com/users/paulius005/followers","following_url":"https://api.github.com/users/paulius005/following{/other_user}","gists_url":"https://api.github.com/users/paulius005/gists{/gist_id}","starred_url":"https://api.github.com/users/paulius005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulius005/subscriptions","organizations_url":"https://api.github.com/users/paulius005/orgs","repos_url":"https://api.github.com/users/paulius005/repos","events_url":"https://api.github.com/users/paulius005/events{/privacy}","received_events_url":"https://api.github.com/users/paulius005/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T09:54:52Z","updated_at":"2016-02-08T09:54:52Z","body":"Yep! Agreed"}}