Mounting multiple instances of the same engine in Rails 3
I'm wanting to make use of the new modularity prospects offered by the architecture changes in rails 3. However, rather than just mount an engine as in the majority of examples...
Rails.开发者_StackOverflow社区application.routes.draw do
match "/blog" => Rack::Blog
end
...I'd like to mount multiple versions of the same engines, and have those instances independently configured. Something along the lines of...
Rails.application.routes.draw do
match "/news" => Blog.new("path/to/blog_1/config")
match "/blog" => Blog.new("path/to/blog_2/config")
end
Is this sort of functionality catered for? Has anyone implemented anything similar?
Thanks, fturtle
My gut tells me no, because the namespacing of the first implementation would step on the toes of the second. Though since the files would be the same I guess that wouldn't matter? How did you get on in the end?
精彩评论