Hi I'm trying to make a forgot password using bcrypt in rails. I've taken the method "forgot_password" described in the bcrypt documentation and made a mailer for it. I've set this method in my user model like self.forgot_password
I'm trying to call this method in a form just under the login form in sessions/new but I think I don't have the good way to do it. Here is my form code :
<%= form_for :user, :url=>{:action=>"forgot_password"} do |f| %>
<p>Réintialiser mon mot de passe en renseignant votre email ci-dessous :</p>
<div class="field">
<%= f.text_field :email, :placeholder=>"ex: cdupont@gmail.com" %>
</div>
<div class="actions">
<%= f.submit "Me renvoyer un email", :class => 'btn btn-warning' %></center>
</div>
<% end %>