Module: Padrino::Routing::ClassMethods
Overview
Class methods responsible for enhanced routing for controllers.
Instance Method Summary
-
#absolute_url(*args) ⇒ ObjectReturns absolute url. -
#add_filter(type, &block) ⇒ ObjectAdds a filter hook to a request. -
#after(*args, &block) ⇒ ObjectAdd an after filter hook. -
#before(*args, &block) ⇒ ObjectAdd a before filter hook. -
#compiled_router ⇒ Object -
#construct_filter(*args, &block) ⇒ ObjectCreates a filter to process before/after the matching route. -
#controller(*args) { ... } ⇒ Object (also: #controllers)Method to organize our routes in a better way. -
#deferred_routes ⇒ Object -
#delete(path, *args, &block) ⇒ Object -
#get(path, *args, &block) ⇒ Object -
#head(path, *args, &block) ⇒ Object -
#link(path, *args, &block) ⇒ Object -
#options(path, *args, &block) ⇒ Object -
#parent(name = nil, options = {}) ⇒ ObjectProvides many parents with shallowing. -
#patch(path, *args, &block) ⇒ Object -
#post(path, *args, &block) ⇒ Object -
#process_path_for_parent_params(path, parent_params) ⇒ ObjectProcesses the existing path and prepends the 'parent' parameters onto the route Used for calculating path in route method. -
#put(path, *args, &block) ⇒ Object -
#rebase_url(url) ⇒ Object -
#recognize_path(path) ⇒ Symbol, HashRecognize a given path. -
#reset_router! ⇒ Object -
#router ⇒ Object (also: #urls)Using PathRouter, for features and configurations. -
#unlink(path, *args, &block) ⇒ Object -
#url(*args) ⇒ Object (also: #url_for)Instance method for url generation.
Instance Method Details
#absolute_url(*args) ⇒ Object
Returns absolute url. By default adds 'localhost' before generated url. To change that `set :base_url, 'example.com'` in your app.
#add_filter(type, &block) ⇒ Object
Adds a filter hook to a request.
#after(*args, &block) ⇒ Object
Add an after filter hook.
#before(*args, &block) ⇒ Object
Add a before filter hook.
#compiled_router ⇒ Object
#construct_filter(*args, &block) ⇒ Object
Creates a filter to process before/after the matching route.
#controller(*args) { ... } ⇒ Object Also known as: controllers
Method to organize our routes in a better way.
In a controller, before and after filters are scoped and don't
affect other controllers or the main app.
In a controller, layouts are scoped and don't affect other
controllers or the main app.
#deferred_routes ⇒ Object
#delete(path, *args, &block) ⇒ Object
#get(path, *args, &block) ⇒ Object
#head(path, *args, &block) ⇒ Object
#link(path, *args, &block) ⇒ Object
#options(path, *args, &block) ⇒ Object
#parent(name = nil, options = {}) ⇒ Object
Provides many parents with shallowing.
#patch(path, *args, &block) ⇒ Object
#post(path, *args, &block) ⇒ Object
#process_path_for_parent_params(path, parent_params) ⇒ Object
Processes the existing path and prepends the 'parent' parameters onto the route Used for calculating path in route method.
#put(path, *args, &block) ⇒ Object
#rebase_url(url) ⇒ Object
#recognize_path(path) ⇒ Symbol, Hash
Recognize a given path.
#reset_router! ⇒ Object
#router ⇒ Object Also known as: urls
Using PathRouter, for features and configurations.
#unlink(path, *args, &block) ⇒ Object
#url(*args) ⇒ Object Also known as: url_for
Instance method for url generation.
© 2010–2020 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Routing/ClassMethods