Flowdock
isolate_namespace(mod) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Show source
Register or log in to add new notes.
January 18, 2013
0 thanks

Some documentation available in RailsGuides

The Rails engines getting started guide discusses the usage of isolate_namespace: http://edgeguides.rubyonrails.org/engines.html

July 16, 2013
0 thanks

isolate_namespace description with example

Normally when you create controllers, helpers and models inside an engine, they are treated as if they were created inside the application itself. This means that all helpers and named routes from the application will be available to your engine’s controllers as well.

However, sometimes you want to isolate your engine from the application, especially if your engine has its own router. To do that, you simply need to call isolate_namespace. This method requires you to pass a module where all your controllers, helpers and models should be nested to:

module MyEngine
 class Engine < Rails::Engine
   isolate_namespace MyEngine
 end

end

With such an engine, everything that is inside the MyEngine module will be isolated from the application.

Detail reference: http://edgeapi.rubyonrails.org/classes/Rails/Engine.html