Module: Padrino::Routing

Defined in:
padrino-core/lib/padrino-core/application/routing.rb

Overview

Padrino provides advanced routing definition support to make routes and url generation much easier. This routing system supports named route aliases and easy access to url paths. The benefits of this is that instead of having to hard-code route urls into every area of your application, now we can just define the urls in a single spot and then attach an alias which can be used to refer to the url throughout the application.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: UnrecognizedException

Constant Summary

CONTENT_TYPE_ALIASES =

Defines common content-type alias mappings

{ :htm => :html } unless defined?(CONTENT_TYPE_ALIASES)
ROUTE_PRIORITY =

Defines the available route priorities supporting route deferrals.

{:high => 0, :normal => 1, :low => 2} unless defined?(ROUTE_PRIORITY)

Class Method Summary (collapse)

Class Method Details

+ (Object) registered(app) Also known as: included

Main class that register this extension.



159
160
161
162
# File 'padrino-core/lib/padrino-core/application/routing.rb', line 159

def registered(app)
  app.send(:include, InstanceMethods)
  app.extend(ClassMethods)
end