title: Named routes in mounted rails engine
body: <p>I'm making a small rails engine which I mount like this:</p>
  
  <pre><code>mount BasicApp::Engine =&gt; "/app"
  </code></pre>
  
  <p>Using <a href="https://stackoverflow.com/questions/7431687/listing-rake-routes-for-a-mountable-rails-3-1-engine">this answer</a> I have verified that all the routes in the engine are as the should be:</p>
  
  <p>However - when I (inside the engine) link to a named route (defined inside the engine) I get this error</p>
  
  <pre><code>undefined local variable or method `new_post_path' for #&lt;#&lt;Class:0x000000065e0c08&gt;:0x000000065d71d0&gt;
  </code></pre>
  
  <p>Running "rake route" clearly verifies that "new_post" should be a named path, so I have no idea why Rails (3.1.0) can't figure it out. Any help is welcome</p>
  
  <p>my config/route.rb (for the engine) look like this</p>
  
  <pre><code>BasicApp::Engine.routes.draw do
    resources :posts, :path =&gt; '' do
                  resources :post_comments
                  resources :post_images
          end
  end
  </code></pre>
  
  <p>I should add that it is and isolated engine. However paths like main_app.root_path works fine - while root_path does not</p>