diff options
author | Xavier Noria <fxn@hashref.com> | 2011-05-14 11:21:27 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-05-14 11:21:27 +0200 |
commit | d49113023676fbf0b6653730f5bde759990caede (patch) | |
tree | de8a47655ad3a1fa1e73dbc307ec9b806637b3ec /actionpack/lib/action_controller | |
parent | db886c817c3620ceaa68a988947e49e5219532fd (diff) | |
parent | e5524d538c0d0f39d655a78fc45d2122c0ff2f2a (diff) | |
download | rails-d49113023676fbf0b6653730f5bde759990caede.tar.gz rails-d49113023676fbf0b6653730f5bde759990caede.tar.bz2 rails-d49113023676fbf0b6653730f5bde759990caede.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
actionpack/lib/action_view/helpers/date_helper.rb
railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/url_for.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb index 6fc0cf1fb8..08132b1900 100644 --- a/actionpack/lib/action_controller/metal/url_for.rb +++ b/actionpack/lib/action_controller/metal/url_for.rb @@ -1,3 +1,24 @@ +# Includes +url_for+ into the host class. The class has to provide a +RouteSet+ by implementing +# the <tt>_routes</tt> method. Otherwise, an exception will be raised. +# +# In addition to <tt>AbstractController::UrlFor</tt>, 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 +# => module ActionController module UrlFor extend ActiveSupport::Concern |