On 31 October 2012 14:22, IT Coobo Internal T. [email protected]
wrote:
Hi everbody,
I’m new in the forum. I’ studing ruby and rails and I hope learn faster
with the help of the forum.
I suggest your best plan might be to work right through a tutorial on
rails to help you to understand the basics. railstutorial.org is good
and is free to use online. Make sure that any tutorial you use is for
Rails 3 and that you use exactly the right version of rails that the
tutorial expects.
Il 31/10/12 15:22, IT Coobo Internal T. ha scritto:
Cbapp::Application.routes.draw do
resources :users
root :to => ‘users#index’
match ‘users/login’ => ‘users#login’
end
rules order in routes.rb is important: users resource ‘users/:id’
matches before ‘users/login’ so login is the id
you can invert the order of the rules or, better, use a member:
Cbapp::Application.routes.draw do
resources :users do
member do
get ‘login’
end
end
root :to => ‘users#index’
end