Sha256: 7353b3772d2decb70e752f44eeeab49e98ab5c2bb182ebf6d367a666c8ad8052

Contents?: true

Size: 1.35 KB

Versions: 31

Compression:

Stored size: 1.35 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
  resources :fake_models
  resources :obj
  resources :models

  # 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

31 entries across 31 versions & 3 rubygems

Version Path
drogus-merb-sexy-forms-0.0.3 spec/fixture/config/router.rb
drogus-merb-sexy-forms-0.0.4 spec/fixture/config/router.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/config/router.rb
merb-helpers-1.0.15 spec/fixture/config/router.rb
merb-helpers-1.0.14 spec/fixture/config/router.rb
merb-helpers-1.0.13 spec/fixture/config/router.rb
merb-helpers-1.0.12 spec/fixture/config/router.rb
merb-helpers-0.9.10 spec/fixture/config/router.rb
merb-helpers-0.9.13 spec/fixture/config/router.rb
merb-helpers-1.0.10 spec/fixture/config/router.rb
merb-helpers-1.0.11 spec/fixture/config/router.rb
merb-helpers-1.0.6.1 spec/fixture/config/router.rb
merb-helpers-1.0.2 spec/fixture/config/router.rb
merb-helpers-1.0.3 spec/fixture/config/router.rb
merb-helpers-1.0.4 spec/fixture/config/router.rb