Ruby on Rails Wednesday, October 31, 2012

Try this:

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

Enviado desde mi iPhone

El 31/10/2012, a las 15:22, IT Coobo Internal Team <lists@ruby-forum.com> escribió:

> 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.
>
>

--
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