I am using gem clearance for user authentication, but now I encountered problems with implementing a 'change password' link. This is what I have:
<a href="<%= edit_user_password_path(current_user) %>">...</a>
but in Clearance::passwords_controller
we have following:
before_filter :forbid_missing_token, only: [:edit, :update]
...
def forbid_missing_token
if params[:token].to_s.blank?
flash_failure_when_forbidden
render template: 'passwords/new'
end
end
So it renders a new
template instead of edit
. What is this :token
for? How can I pass it to the controller? Where can I get it?