나는 그래서 그래서 다시 암호재정 고안 암호 컨트롤러
을 보낸 후 모든 리디렉션되지 않습니다
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
을 사용하지 않으려는, I 앱/컨트롤러/사용자에 새 파일을 생성/이
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
및 변경과 같은
passwords_controller.rb라고
devise_for :users, :controllers => { :invitations => 'users/invitations', :passwords => 'users/passwords' }
나는 또한 devise_invite 보석이 내 경로 ..
나는이 오류를 얻을 잊어 버린 암호에 대한 링크를 클릭
Started GET "https://stackoverflow.com/users/password/new" for 127.0.0.1 at 2012-11-16 10:21:07 +0200
ActionController::RoutingError (uninitialized constant Users::PasswordsController):
내 rake routes
있습니다
user_password POST /users/password(.:format) users/passwords#create
new_user_password GET /users/password/new(.:format) users/passwords#new
edit_user_password GET /users/password/edit(.:format) users/passwords#edit
PUT /users/password(.:format) users/passwords#update
보기의 링크는
입니다.<%= link_to "Forgot your password?", new_password_path(User) , :class => "control-group", :style => "position: absolute; bottom: 0", :id=>"forgotpass" %>
무엇이 누락 되었습니까?
어쩌면 오타가 있기 때문에 – Thanh
난 이해가 안 돼 –
당신의보기에서'new_password_path (User)'를'new_user_password_path'로 바꾼다 – Thanh