Routing Error in Rails - uninitialized constant

0

Well, I created an application in rails and generated some models, controllers, etc. As follows:

rails g scaffold nivelIntermediario/Historia descricao:string

My route file looks like this:

namespace :nivel_intermediario do
   resources :historias
end

And my controller like this:

class NivelIntermediario::HistoriaController < ApplicationController

Then, every time you have access to create a new story, this error appears:

uninitialized constant NivelIntermediario::CartasController

Follow the routes:

nivel_intermediario_historias GET    /nivel_intermediario/historias(.:format)          nivel_intermediario/historias#index
                                  POST   /nivel_intermediario/historias(.:format)          nivel_intermediario/historias#create
 new_nivel_intermediario_historia GET    /nivel_intermediario/historias/new(.:format)      nivel_intermediario/historias#new
edit_nivel_intermediario_historia GET    /nivel_intermediario/historias/:id/edit(.:format) nivel_intermediario/historias#edit
     nivel_intermediario_historia GET    /nivel_intermediario/historias/:id(.:format)      nivel_intermediario/historias#show
                                  PATCH  /nivel_intermediario/historias/:id(.:format)      nivel_intermediario/historias#update
                                  PUT    /nivel_intermediario/historias/:id(.:format)      nivel_intermediario/historias#update
                                  DELETE /nivel_intermediario/historias/:id(.:format)      nivel_intermediario/historias#destroy
    
asked by anonymous 19.09.2015 / 02:28

1 answer

0

One thing, inside the controllers you should have a folder level_intermediary and within it the file histias_controller.rb.

Can you send a print from your controllers folder?

    
17.12.2015 / 17:35