I am new to Rails and am just implementing some basic applications. Just starting on my second app and have run into what is a basic problem, but Google is yielding me nothing.
You need to add admin_login
method to routes, like:-
map.connect '/user/admin_login', :controller => 'users', :action => 'admin_login'
For Rails > 3 you should use the new routing syntax:
resources :items, :cart
resource :user do
# Route GET /user/admin_login
get 'admin_login', :on => :collection
end
See Rails guides for more information about routing.
you can use
match 'admin_login' => 'user#admin_login', :as =>'admin_login'
default method for this call is post u can change method behavior by using
:via => [:post/:put/:get]
There is a new method in Rails 3. You can use the following:
get 'admin_login' => "user#admin_login"
find “config/routes.rb” file, edit, Locate the following line:
# See how all your routes lay out with "rake routes"
In this line add the following line, as follows:
map.connect '',:controller=>"index",:action=>"index"