Sha256: bee7142e178000bb202497bb23ffe9dff0fda349e58fa6e1103cc40f3537d942

Contents?: true

Size: 1.49 KB

Versions: 33

Compression:

Stored size: 1.49 KB

Contents

# Merb::Router is the request routing mapper for the merb framework.
#
# You can route a specific URL to a controller / action pair:
#
#   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:
#
#   match("/books/:book_id/:action").
#     to(:controller => "books")
#   
# Or, use placeholders in the "to" results for more complicated routing, e.g.:
#
#   match("/admin/:module/:controller/:action/:id").
#     to(:controller => ":module/:controller")
#
# You can specify conditions on the placeholder by passing a hash as the second
# argument of "match"
#
#   match("/registration/:course_name", :course_name => /^[a-z]{3,5}-\d{5}$/).
#     to(:controller => "registration")
#
# 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
  # RESTful routes
  # 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
  default_routes
  
  # Change this for your home page to be available at /
  # match('/').to(:controller => 'whatever', :action =>'index')
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
slashport-0.15.12 config/router.rb
merb-gen-1.1.3 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.1.2 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.1.1 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.1.0 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.1.0.rc1 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.1.0.pre lib/generators/templates/application/merb_core/config/router.rb
slashport-0.15.10 config/router.rb
merb-gen-1.0.15 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.0.14 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.0.13 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.0.12 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-0.9.13 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-0.9.10 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-0.9.11 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-0.9.12 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-0.9.8 lib/generators/templates/application/merb/config/router.rb
merb-gen-0.9.9 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.0.1 lib/generators/templates/application/merb_core/config/router.rb
merb-gen-1.0.11 lib/generators/templates/application/merb_core/config/router.rb