0

I have an admin namespace in routes with users controller:

namespace :admin do
   resources :users
end

So i have users_controller.rb in /admin folder, and a User model. In my _form partial i am trying to create a form for both new and edit actions, but when i try to create it using this:

= simple_form_for @user do |f|

I am receiving in error in both edit and new actions:

ActionView::Template::Error (undefined method `user_path' for...
Tamik Soziev
  • 14,307
  • 5
  • 43
  • 55

1 Answers1

4

Just try in the form with,

= simple_form_for [:admin, @user] do |f|
Santosh
  • 1,251
  • 9
  • 15