1
votes

I want to be able to do the following:

change_pass_user_path(usuario)

in a "link_to" (for example).

where "change_pass" is the name of my action inside de "user" controller.

I already added this:

map.resources :users

to my routes file. (so I'm already able to do things like: edit_user_path)

I already tried:

map.resources :users do
    get 'change_pass'
  end

but it returns this error:

undefined method `get' for main:Object (NoMethodError)

How can I do that?

Thx

1

1 Answers

1
votes

Try this,

map.resources :users, :member => { :change_pass => :get }