1 # Merb::Router is the request routing mapper for the merb framework.
3 # You can route a specific URL to a controller / action pair:
6 # to(:controller => "info", :action => "contact")
8 # You can define placeholder parts of the url with the :symbol notation. These
9 # placeholders will be available in the params hash of your controllers. For example:
11 # r.match("/books/:book_id/:action").
12 # to(:controller => "books")
14 # Or, use placeholders in the "to" results for more complicated routing, e.g.:
16 # r.match("/admin/:module/:controller/:action/:id").
17 # to(:controller => ":module/:controller")
19 # You can also use regular expressions, deferred routes, and many other options.
20 # See merb/specs/merb/router.rb for a fairly complete usage sample.
22 Merb.logger.info("Compiling routes...")
23 Merb::Router.prepare do |r|
24 r.add_slice(:MerbMart, 'admin')