Method: Cms::RouteExtensions#mount_browsercms
- Defined in:
- lib/cms/route_extensions.rb
#mount_browsercms ⇒ Object Also known as: routes_for_browser_cms
Adds the routes required for BrowserCMS to function to a routes.rb file. Should be the last route in the file, as all following routes will be ignored.
Usage:
YourAppName::Application.routes.draw do
match '/some/path/in/your/app' :to=>"controller#action''
mount_browsercms
end
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/cms/route_extensions.rb', line 39 def mount_browsercms mount Cms::Engine => "/cms", :as => "cms" add_page_routes_defined_in_database # Handle 'stock' attachments match "/attachments/:id/:filename", :to=>"cms/attachments#download" match "/", :to=>"cms/content#show" match "*path", :to=>"cms/content#show" end |