Your form looks for a POST
to stores_path
, but it's store_maintenance_index_path
where your route goes for the create action. So there is no stores_path
.
Your setup isn't right..
You don't have any routes resources for stores
, only for maintenances
..
So the real question is, what are you trying to CRUD? Is it maintenances
or stores
?
If you want to CRUD stores
, edit your routes to:
namespace :store do
resources :stores
end
If you really want to edit the pathname to maintenance, something like this:
namespace :store do
resources :stores, path: 'maintenances', controller: 'stores', as: 'stores'
end
You don't want to CRUD stores
in a maintenances
controller, that's just not right...