Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

How to initialize variable for link_to #50

Closed
nemesis51 opened this issue Feb 8, 2014 · 3 comments
Closed

How to initialize variable for link_to #50

nemesis51 opened this issue Feb 8, 2014 · 3 comments

Comments

@nemesis51
Copy link

error

I have a login.html.erb in the views/students folder not sure why it works for 'new' and not the 'login'.

I also defined the login method in the controller but didn't help. so I am missing something still.

@C-Khalid
Copy link

C-Khalid commented Feb 8, 2014

try to add this line to the route file
get 'login', to: 'sessions#create', as: :login
and in the index
<%= link_to "login", login_path %>

@jaimerump
Copy link

@mekdif has it, you don't have a route defined. You can't use the path helper without a route defined.

@mitchlloyd
Copy link
Contributor

@nemesis51 Are you still working on this issue? If not could you close this one down?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants