From dc663dd52c99ab6e6c633b54d1a0e836f379bf9f Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Thu, 21 Jun 2012 18:39:35 +0200 Subject: 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. --- actionpack/test/template/erb/helper.rb | 3 ++- actionpack/test/template/url_helper_test.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/erb/helper.rb b/actionpack/test/template/erb/helper.rb index 799f9e4036..a1973068d5 100644 --- a/actionpack/test/template/erb/helper.rb +++ b/actionpack/test/template/erb/helper.rb @@ -1,5 +1,6 @@ module ERBTest class ViewContext + include ActionView::Helpers::UrlHelper include SharedTestRoutes.url_helpers include ActionView::Helpers::TagHelper include ActionView::Helpers::JavaScriptHelper @@ -20,4 +21,4 @@ module ERBTest "<%= #{str} do %>#{rest}<% end %>" end end -end \ No newline at end of file +end diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb index f9f8c36fff..9c4271f19b 100644 --- a/actionpack/test/template/url_helper_test.rb +++ b/actionpack/test/template/url_helper_test.rb @@ -20,9 +20,9 @@ class UrlHelperTest < ActiveSupport::TestCase get "/article/:id" => "foo#article", :as => :article end + include ActionView::Helpers::UrlHelper include routes.url_helpers - include ActionView::Helpers::UrlHelper include ActionView::Helpers::JavaScriptHelper include ActionDispatch::Assertions::DomAssertions include ActionView::Context -- cgit v1.2.3