0

I'm a little bit confused - when user creation is successful.

I can call ( working )

if @wibiya_user.save
 render :edit
end

but why when I write

   if @wibiya_user.save
       format.html { redirect_to edit_wibiya_user_path(@wibiya_user) }
   end

I get Routing error:

No route matches {:action=>"edit", :controller=>"wibiya_users"}

However I do have in my routes:

     resources :wibiya_users
 ...
rake routes
  edit_wibiya_user GET    /wibiya_users/:id/edit(.:format) wibiya_users#edit

Why it is happening like that ?

MID
  • 1,815
  • 4
  • 29
  • 40
  • It shouldn't - can you show us your complete action from where you redirect, and all routes concerning the `:wibiya_users` resource? – Thilo Sep 08 '12 at 13:35

1 Answers1

1

Change your users controller (filename, class name, redirects, etc.) to be a WibiyaUsersController.

Explanation: The resources :wilibya_user in your routes.rb file sets up the various routes for that resource. It assumes the controller is called wibiya_users_controller

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
  • Thanks) Can you help me with this -> http://stackoverflow.com/questions/12329960/how-i-can-dynamically-generate-url-for-generating-xls-report or http://stackoverflow.com/questions/12328873/how-to-check-user-email-uniqueness-and-pass-result-to-jquery – MID Sep 08 '12 at 13:32