diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-06-21 18:39:35 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-08-28 11:19:29 +0200 |
commit | dc663dd52c99ab6e6c633b54d1a0e836f379bf9f (patch) | |
tree | c6c1a406186d88cb74b40ecfec337ab70c1a04db /actionpack/lib/action_controller.rb | |
parent | 9b0ac0bc74569db460f87ea6888b3847be0ff5be (diff) | |
download | rails-dc663dd52c99ab6e6c633b54d1a0e836f379bf9f.tar.gz rails-dc663dd52c99ab6e6c633b54d1a0e836f379bf9f.tar.bz2 rails-dc663dd52c99ab6e6c633b54d1a0e836f379bf9f.zip |
Don't require action_dispatch in ActionView::UrlHelpers
ActionDispatch::Routing::UrlFor was always required in UrlHelpers. This
was changed by splitting previous implementation of UrlHelper into 2
modules: ActionView::Helpers::UrlHelper and
ActionView::Routing::UrlHelper. The former one keeps only basic
implementation of url_for. The latter adds features that allow to use
routes and is only required when url_helpers or mounted_helpers are
required.
Diffstat (limited to 'actionpack/lib/action_controller.rb')
-rw-r--r-- | actionpack/lib/action_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb index 969481928d..0b96c96a2c 100644 --- a/actionpack/lib/action_controller.rb +++ b/actionpack/lib/action_controller.rb @@ -61,6 +61,10 @@ end require 'action_view' require 'action_view/vendor/html-scanner' +ActiveSupport.on_load(:action_view) do + ActionView::RoutingUrlFor.send(:include, ActionDispatch::Routing::UrlFor) +end + # Common Active Support usage in Action Controller require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/load_error' |