diff options
Diffstat (limited to 'actionpack/lib/action_controller/new_base/url_for.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/url_for.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/new_base/url_for.rb b/actionpack/lib/action_controller/new_base/url_for.rb index af5b21012b..902cac4d15 100644 --- a/actionpack/lib/action_controller/new_base/url_for.rb +++ b/actionpack/lib/action_controller/new_base/url_for.rb @@ -1,5 +1,14 @@ module ActionController module UrlFor + extend ActiveSupport::Concern + + depends_on RackConvenience + + def process_action(*) + initialize_current_url + super + end + def initialize_current_url @url = UrlRewriter.new(request, params.clone) end @@ -16,7 +25,7 @@ module ActionController # by this method. def default_url_options(options = nil) end - + def rewrite_options(options) #:nodoc: if defaults = default_url_options(options) defaults.merge(options) @@ -24,7 +33,7 @@ module ActionController options end end - + def url_for(options = {}) options ||= {} case options @@ -37,4 +46,4 @@ module ActionController end end end -end
\ No newline at end of file +end |