Reputation: 14798
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...
Upvotes: 0
Views: 687
Reputation: 1261
Just try in the form with,
= simple_form_for [:admin, @user] do |f|
Upvotes: 4