Sha256: 61b95ed190ccd0b11f5bd58a8704f4e97749038cc1bae56f6417d46982c7e884

Contents?: true

Size: 1009 Bytes

Versions: 12

Compression:

Stored size: 1009 Bytes

Contents

# Routes require an xpath against which to match, and a controller/action pair to which to map.
#
# xpath("//message[@type = 'chat']").to(:controller => "message", :action => "receive")
#
# Routes can be assigned priorities. The highest priority executes first, and the default priority is 0.
#
# xpath("//message[@type = 'chat']").to(:controller => "message", :action => "priority").priority(5000000)
#
# It is not possible to easily check for namespace URI equivalence in xpath, but the following helper function was added.
#
# xpath("//iq[@type='get']/*[namespace(., 'query', 'http://jabber.org/protocol/disco#info')]").to(:controller => "discovery", :action => "services")
#
# That syntax is ugly out of necessity. But, relax, you're using Ruby.
#
# There are a few helper methods for generating xpaths. The following is equivalent to the above example:
#
# disco_info.to(:controller => "discovery", :action => "services")
#
# See lib/babylon/router/dsl.rb for more helpers.
Babylon.router.draw do
  
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
julien51-babylon-0.1.0 templates/babylon/config/routes.rb
julien51-babylon-0.1.10 templates/babylon/config/routes.rb
julien51-babylon-0.1.11 templates/babylon/config/routes.rb
julien51-babylon-0.1.2 templates/babylon/config/routes.rb
julien51-babylon-0.1.3 templates/babylon/config/routes.rb
julien51-babylon-0.1.4 templates/babylon/config/routes.rb
julien51-babylon-0.1.5 templates/babylon/config/routes.rb
julien51-babylon-0.1.6 templates/babylon/config/routes.rb
julien51-babylon-0.1.7 templates/babylon/config/routes.rb
julien51-babylon-0.1.8 templates/babylon/config/routes.rb
julien51-babylon-0.1.9 templates/babylon/config/routes.rb
mohiam-babylon-0.1.7 templates/babylon/config/routes.rb