This project is archived and is in readonly mode.

#5385 ✓invalid
Utyasheva Oksana

Using match with namespace

Reported by Utyasheva Oksana | August 16th, 2010 @ 09:37 AM

I have namespace "admin" and controller "Accounts" with namespace "Admin".
And Controller Accounts has method change_password.
I want have route admin/accounts/change_password.

For this I try using member

namespace :admin do

resources :accounts do
  member do
    get :change_password
  end
end

end

But my method "change_password" does not have identificator(1) (admin/accounts/1/change_password/).

What can I use for this?

Comments and changes to this ticket

  • Andrew White

    Andrew White August 20th, 2010 @ 12:21 AM

    • State changed from “new” to “invalid”
    • Importance changed from “” to “Low”

    I think you're trying to change the password of the currently logged in admin, yes? In that case use resource instead of resources:

    namespace :admin do
      resource :account do
        member do
          get :change_password
        end
      end
    end
    

    In future can you please use the general mailing list for support - this website is for reporting bugs in Rails.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages