I have written a engine named shopping and the engine have one "product" resource.
In the shopping engine the config/routes.rb have the below content:
match "shopping"=> "shopping/products#index"
namespace :shopping do
resources :carts do
resources :containers do
resources :products do
resources :options do
resources :virtues do
I mount the engine into my application as below:
In the shopping engine the shopping_engine_path helper can output the right path /space/bb(bb is a user for testing) and the shopping_engine.shopping_products_path output the right path /space/bb/products too.
In the main application the shopping_engine_path can work and output the right path /space/bb.However shopping_engine.shopping_products_path don't output the user name ,give me a wrong path /space/products,form_for [shopping_engine,@product] don't work too.
My rails version is 3.2.0 from github.
Now I see. Just add the :user_name option as argument to the route helper .