Sha256: 34d0ec330a42e0feff6930caf83dc1402ee9efcada8706603d82dfeea63f2f5b

Contents?: true

Size: 1.36 KB

Versions: 54

Compression:

Stored size: 1.36 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
  match("/").to(:controller => "testing", :action => "show_form")
  match("/upload").to(:controller => "testing", :action => "upload")
  match("/internal_redirect").to(:controller => "testing", :action => "internal_redirect")
  match("/external_redirect").to(:controller => "testing", :action => "external_redirect")
end

Version data entries

54 entries across 54 versions & 21 rubygems

Version Path
diabolo-webrat-0.5.1 spec/integration/merb/config/router.rb
dstrelau-webrat-0.5.1 spec/integration/merb/config/router.rb
emipair-webrat-0.0.1 spec/integration/merb/config/router.rb
hardbap-webrat-0.5.1 spec/integration/merb/config/router.rb
hardbap-webrat-0.5.2 spec/integration/merb/config/router.rb
winton-sum-0.1.0 vendor/webrat/spec/integration/merb/config/router.rb
winton-sum-0.1.1 vendor/webrat/spec/integration/merb/config/router.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/integration/merb/config/router.rb
indirect-webrat-0.7.5 spec/integration/merb/config/router.rb
indirect-webrat-0.7.4 spec/integration/merb/config/router.rb
webrat-0.7.3 spec/integration/merb/config/router.rb
jbd-webrat-0.7.2.rails3 spec/integration/merb/config/router.rb
webrat-0.7.2 spec/integration/merb/config/router.rb
webrat-0.7.2.beta.2 spec/integration/merb/config/router.rb
mutle-webrat-0.7.2.beta.1 spec/integration/merb/config/router.rb
thoughtbot-webrat-0.7.2.pre spec/integration/merb/config/router.rb
webrat-0.7.2.beta.1 spec/integration/merb/config/router.rb
honkster-webrat-0.7.1.2 spec/integration/merb/config/router.rb
honkster-webrat-0.7.1.1 spec/integration/merb/config/router.rb
revo-webrat-0.7.0.1 spec/integration/merb/config/router.rb