Sha256: d2f02e8335a46f9ec35e7710e925b7ea02437c0fc441af776dd81910611c86ec

Contents?: true

Size: 1.29 KB

Versions: 27

Compression:

Stored size: 1.29 KB

Contents

# Merb::Router is the request routing mapper for the merb framework.
#
# You can route a specific URL to a controller / action pair:
#
#   r.match("/contact").
#     to(:controller => "info", :action => "contact")
#
# You can define placeholder parts of the url with the :symbol notation. These
# placeholders will be available in the params hash of your controllers. For example:
#
#   r.match("/books/:book_id/:action").
#     to(:controller => "books")
#   
# Or, use placeholders in the "to" results for more complicated routing, e.g.:
#
#   r.match("/admin/:module/:controller/:action/:id").
#     to(:controller => ":module/:controller")
#
# You can also use regular expressions, deferred routes, and many other options.
# See merb/specs/merb/router.rb for a fairly complete usage sample.

Merb.logger.info("Compiling routes...")
Merb::Router.prepare do |r|
  # RESTful routes
  # r.resources :posts

  # This is the default route for /:controller/:action/:id
  # This is fine for most cases.  If you're heavily using resource-based
  # routes, you may want to comment/remove this line to prevent
  # clients from calling your create or destroy actions with a GET
  r.default_routes
  
  # Change this for your home page to be available at /
  # r.match('/').to(:controller => 'whatever', :action =>'index')
end

Version data entries

27 entries across 21 versions & 5 rubygems

Version Path
merb-core-1.1.3 spec/private/dispatch/fixture/config/router.rb
merb-core-1.1.3 spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.2 spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.2 spec/private/dispatch/fixture/config/router.rb
merb-core-1.1.1 spec/private/dispatch/fixture/config/router.rb
merb-core-1.1.1 spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.0 spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.0 spec/private/dispatch/fixture/config/router.rb
merb-core-1.1.0.rc1 spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.0.rc1 spec/private/dispatch/fixture/config/router.rb
merb-core-1.1.0.pre spec10/private/dispatch/fixture/config/router.rb
merb-core-1.1.0.pre spec/private/dispatch/fixture/config/router.rb
thorero-0.9.4.5 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.2 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.5 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.3 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.4 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.6 spec/private/dispatch/fixture/config/router.rb
merb-core-0.9.7 spec/private/dispatch/fixture/config/router.rb
merb-gen-0.9.2 app_generators/merb/templates/config/router.rb