Module: Roda::RodaPlugins::StaticRouting::ClassMethods

Defined in:
lib/roda/plugins/static_routing.rb

Instance Method Summary collapse

Instance Method Details

#static_route(path, &block) ⇒ Object

Add a static route for any request method. These are tried after the request method specific static routes (e.g. static_get), but allow you to use Roda’s routing tree methods inside the route for handling shared behavior while still allowing request method specific handling.



62
63
64
# File 'lib/roda/plugins/static_routing.rb', line 62

def static_route(path, &block)
  hash_path(:static_routing, path, &block)
end