Topic: Routes format Problem [SOLVED]

i want to pass a ID to a page so i can display some special info about that record but its not coming up the right way

my routes file

  resources :accounts
  match 'account-audit' => 'accounts#audited',:as => :accountaudit

i am getting

and i want to be getting


rake routes

accounts GET    /accounts(.:format)                          accounts#index
                           POST   /accounts(.:format)                          accounts#create
               new_account GET    /accounts/new(.:format)                      accounts#new
              edit_account GET    /accounts/:id/edit(.:format)                 accounts#edit
                   account GET    /accounts/:id(.:format)                      accounts#show
                           PUT    /accounts/:id(.:format)                      accounts#update
                           DELETE /accounts/:id(.:format)                      accounts#destroy
              accountaudit        /account-audit(.:format)                     accounts#audited

how do i update my route

Last edited by moiseszaragoza (2012-07-25 10:50:08)

Re: Routes format Problem [SOLVED]

on your routes file try

match '/account/:id/audit' => 'accounts#audited',:as => :accountaudit