Ruby on Rails Wednesday, October 31, 2012

Hi everbody,

I'm new in the forum. I' studing ruby and rails and I hope learn faster
with the help of the forum.

Well, my problem is basic. I have made a scaffold to create a new object
User. User has name, email and password.

I created a new view named "login", but i don't know how to make the
route to this view. I Have the function in the controller too.


Cbapp::Application.routes.draw do
resources :users
root :to => 'users#index'
match 'users/login' => 'users#login'
end


and I got this error: Couldn't find User with id=login

Thanks!

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment