ahmet
ahmet

Reputation: 5005

jQuery Validation in RoR

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?

Upvotes: 0

Views: 209

Answers (1)

tmaximini
tmaximini

Reputation: 8503

in rails 3 you dont't use anymore map.resources

just use resources :users instead

refer 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

www.myapp.com/check_mail you could do this in your routes:

  match 'check_mail' => "users#check_mail"

Upvotes: 2

Related Questions