Sha256: 2ef89f72a8ad801ace380ba8eeaa3d95cc03253816de44639b32499c9fd48a91
Contents?: true
Size: 958 Bytes
Versions: 3
Compression:
Stored size: 958 Bytes
Contents
# encoding: utf-8 # http://wiki.github.com/botanicus/rango/routers require "rango/router" Rango::Router.use(:<%= @router.to_sym %>) <% case @router %> <% when "usher" %> # http://github.com/joshbuddy/usher Rango::Router.app = Usher::Interface.for(:rack) do default(<%= @name.camel_case %>::Application.dispatcher(:not_found_handler)) # route not found to the controller so we can properly rescue it get("/").to(<%= @name.camel_case %>::ShowCase.dispatcher(:index)).name(:showcase) end <% when "rack-mount" %> # http://github.com/josh/rack-mount Rango::Router.app = Rack::Mount::RouteSet.new do |set| # add_route takes a rack application and conditions to match with # conditions may be strings or regexps # See Rack::Mount::RouteSet#add_route for more options. set.add_route <%= @name.camel_case %>::ShowCase.dispatcher(:index), method: "get", path: "/" end <% when "rack-router" %> # TODO: routes <% when "urlmap" %> # TODO: routes <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rango-0.2.6 | stubs/stack/content/lib/%name%/urls.rb.rbt |
rango-0.2.5.1 | stubs/stack/content/lib/%name%/urls.rb.rbt |
rango-0.2.4.1 | stubs/stack/content/lib/%name%/urls.rb.rbt |