routing problem after rails 2.3 to rails 3 upgrade [duplicate]
In my routes I have:
namespace :pm do
match '/' => 'base#index', :as => :root
resources :projects do
Also I have app/controllers/pm/projects_controller.rb
When going in browser to /pm/projects/1, I should have params[:id] == 1, but instead getting empty params hash in action.
In log file:
Started GET "/pm/projects/1" for 127.0.0.1 at Wed Sep 14 15:01:22 +0400 2011
Processing by Pm::ProjectsController#show as HTML
So controller and action are recognised normally
Has anybody seen such thing? Where could be the problem?
Thanks!
It expects a namespaced controller.
resources :projects, :controller => "projects"
精彩评论