I want to disconnect
def create self.resource = resource_class.send_reset_password_instructions(resource_params) if successfully_sent?(resource) respond_with({}, :location => after_sending_reset_password_instructions_path_for(resource_name)) else respond_with(resource) end end
therefore it will not be redirected at all after sending the reset password
So, I created a new file under the application / controllers / users / called passwords_controller.rb
which is as follows
class User::PasswordsController < Devise::PasswordsController def create self.resource = resource_class.send_reset_password_instructions(resource_params) if successfully_sent?(resource) flash[:notice] = "sent password" else respond_with(resource) end end def new super end def update super end def edit super end end
and changed in my routes to
devise_for :users, :controllers => { :invitations => 'users/invitations', :passwords => 'users/passwords' }
I also have a devise_invite gem ..
When I click on the forgotten password link, I get this error
Started GET "/users/password/new" for 127.0.0.1 at 2012-11-16 10:21:07 +0200 ActionController::RoutingError (uninitialized constant Users::PasswordsController):
my rake routes
user_password POST /users/password(.:format) users/passwords
view link
<%= link_to "Forgot your password?", new_password_path(User) , :class => "control-group", :style => "position: absolute; bottom: 0", :id=>"forgotpass" %>
What am I missing?
source share