Gaël Gaël - 1 year ago 92
Ruby Question

What does the "mount" instruction mean in Rails routing?

I cannot find the meaning of the keyword "mount" in Rails routing system.

I have set up Mercury to use within my Rails application. It added this line to my
config file:

Appname::Application.routes.draw do
mount Mercury::Engine => '/'

What does the
keyword mean?

Answer Source

Mount within the Rails routes does the equivalent of a Unix mount.
It actually tells the app that another application (usually a Rack application) exists on that location.

It is used mostly for Rails Engines.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download