设计恢复密码链接

bra*_*r19 1 ruby-on-rails forgot-password devise

我尝试在布局视图中设置设计恢复密码链接...我试试这样:

= link_to "?????? ???????", new_password_path(resource_name), :class => "login-link"
Run Code Online (Sandbox Code Playgroud)

但我明白了

undefined local variable or method `resource_name' 
Run Code Online (Sandbox Code Playgroud)

如何在布局中渲染忘记密码?在rails视图中链接?

我的模特也是:

devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable, 
         :token_authenticatable, :timeoutable
Run Code Online (Sandbox Code Playgroud)

rem*_*emo 5

使用

= link_to "?????? ???????", new_password_path('user'), :class => "login-link"
Run Code Online (Sandbox Code Playgroud)

与'用户'或任何你的设计模型类.