Controller Namespaces and Routing issue <p>I created a routing test rails3 app with one model 'User':</p> <pre><code>rails new routing_test_app rails generate model User name:string rails generate scaffold_controller admin/user rake db:migrate </code></pre> <p>Added to routes.db: </p> <pre><code>namespace :admin do resources :users end </code></pre> <p>rake routes</p> <pre><code>admin_users GET /admin/users(.:format) {:action=&gt;"index", :controller=&gt;"admin/users"} admin_users POST /admin/users(.:format) {:action=&gt;"create", :controller=&gt;"admin/users"} new_admin_user GET /admin/users/new(.:format) {:action=&gt;"new", :controller=&gt;"admin/users"} edit_admin_user GET /admin/users/:id/edit(.:format) {:action=&gt;"edit", :controller=&gt;"admin/users"} admin_user GET /admin/users/:id(.:format) {:action=&gt;"show", :controller=&gt;"admin/users"} admin_user PUT /admin/users/:id(.:format) {:action=&gt;"update", :controller=&gt;"admin/users"} admin_user DELETE /admin/users/:id(.:format) {:action=&gt;"destroy", :controller=&gt;"admin/users"} </code></pre> <p>views/admin/users/_form.html.erb</p> <pre><code>&lt;%= form_for(@admin_user) do |f| %&gt; &lt;% if @admin_user.errors.any? %&gt; &lt;div id="error_explanation"&gt; &lt;h2&gt;&lt;%= pluralize(@admin_user.errors.count, "error") %&gt; prohibited this admin_user from being saved:&lt;/h2&gt; &lt;ul&gt; &lt;% @admin_user.errors.full_messages.each do |msg| %&gt; &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;/ul&gt; &lt;/div&gt; &lt;% end %&gt; &lt;%= f.text_field :name %&gt; &lt;div class="actions"&gt; &lt;%= f.submit %&gt; &lt;/div&gt; &lt;% end %&gt; </code></pre> <p>When I go to 'http://localhost:3000/admin/users/new' rails throws an error:</p> <pre><code>undefined method `users_path' for #&lt;#&lt;Class:0x0000010116ca90&gt;:0x000001011588d8&gt; </code></pre> <p>Extracted source (around line #1):</p> <pre><code>1: &lt;%= form_for(@admin_user) do |f| %&gt; 2: &lt;% if @admin_user.errors.any? %&gt; 3: &lt;div id="error_explanation"&gt; 4: &lt;h2&gt;&lt;%= pluralize(@admin_user.errors.count, "error") %&gt; prohibited this admin_user from being saved:&lt;/h2&gt; </code></pre>