map.check_email "users/check_email", :controller => "users", :action => "check_email"
map.resources :users
In the tutorial it tells me to add this to my routes.rb
but i get the error
undefined local variable or method `map' for #<ActionDispatch::Routing::Mapper:0x5f8f308>
I’m using rails 3.0.9, how do i fix this?
in rails 3 you dont’t use anymore map.resources
just use
resources :usersinsteadrefer to this guide for routing in Rails 3:
http://guides.rubyonrails.org/routing.html
if you want a specific route name for check_mail, like
http://www.myapp.com/check_mail you could do this in your routes: