Ruby on Rails - mount another application in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
- Mount is used to mount another application (basically rack application) or rails engines to be used within the current application
syntax:
mount SomeRackApp, at: "some_route"
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
- We can access above mounted application using route helper some_rack_app_path or some_rack_app_url.
If we want to rename this helper name we can do it as:
mount SomeRackApp, at: "some_route", as: :myapp
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team
This will generate the myapp_path and myapp_url helpers which can be used to navigate to this mounted app.