Question

I try to set devise recover password link in my layout view... I try so:

= link_to "Забыли пароль?", new_password_path(resource_name), :class => "login-link"

but i get

undefined local variable or method `resource_name' 

How can i render in layout forget password? link in rails view?

Also my model:

devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable, 
         :token_authenticatable, :timeoutable
Was it helpful?

Solution

Use

= link_to "Забыли пароль?", new_password_path('user'), :class => "login-link"

with 'user' or with whatever your devise model class is.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top