Includes url_for
into the host class. The class has to provide
a RouteSet
by implementing the _routes
method.
Otherwise, an exception will be raised.
In addition to AbstractController::UrlFor
, this module
accesses the HTTP layer to define url options like the host
.
In order to do so, this module requires the host class to implement
env
and request
, which need to be a
Rack-compatible.
Example:
class RootUrl include ActionController::UrlFor include Rails.application.routes.url_helpers delegate :env, :request, :to => :controller def initialize(controller) @controller = controller @url = root_path # named route from the application. end end
Namespace
- MODULE ActionController::Caching
- MODULE ActionController::Compatibility
- MODULE ActionController::ConditionalGet
- MODULE ActionController::Cookies
- MODULE ActionController::DataStreaming
- MODULE ActionController::Flash
- MODULE ActionController::ForceSSL
- MODULE ActionController::Head
- MODULE ActionController::Helpers
- MODULE ActionController::HideActions
- MODULE ActionController::HttpAuthentication
- MODULE ActionController::ImplicitRender
- MODULE ActionController::Instrumentation
- MODULE ActionController::MimeResponds
- MODULE ActionController::ParamsWrapper
- MODULE ActionController::RackDelegation
- MODULE ActionController::Railties
- MODULE ActionController::RecordIdentifier
- MODULE ActionController::Redirecting
- MODULE ActionController::Renderers
- MODULE ActionController::Rendering
- MODULE ActionController::RequestForgeryProtection
- MODULE ActionController::Rescue
- MODULE ActionController::SessionManagement
- MODULE ActionController::Streaming
- MODULE ActionController::TemplateAssertions
- MODULE ActionController::Testing
- MODULE ActionController::UrlFor
- CLASS ActionController::Base
- CLASS ActionController::LogSubscriber
- CLASS ActionController::Metal
- CLASS ActionController::Middleware
- CLASS ActionController::Railtie
- CLASS ActionController::Responder
- CLASS ActionController::TestCase
- CLASS ActionController::TestResponse
Methods
Class Public methods