From 86fc43fd584726ba81b1a3b3e0a6f6000c1f4cc8 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Mon, 8 Jun 2009 13:33:18 -0700 Subject: ActionPack components should no longer have undeclared dependencies. * Tests can be run in isolation * Dependencies added * A few tests modified to avoid depending on AS deps not depended on my files they were testing --- actionpack/lib/action_view/helpers/active_record_helper.rb | 2 ++ actionpack/lib/action_view/helpers/benchmark_helper.rb | 2 +- actionpack/lib/action_view/helpers/url_helper.rb | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/helpers') diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb index b4b9f6e34b..8b70200654 100644 --- a/actionpack/lib/action_view/helpers/active_record_helper.rb +++ b/actionpack/lib/action_view/helpers/active_record_helper.rb @@ -1,6 +1,8 @@ require 'cgi' require 'action_view/helpers/form_helper' require 'active_support/core_ext/class/attribute_accessors' +require 'active_support/core_ext/enumerable' +require 'active_support/core_ext/kernel/reporting' module ActionView class Base diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb index 61c2cecb04..c13a069a35 100644 --- a/actionpack/lib/action_view/helpers/benchmark_helper.rb +++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb @@ -1,4 +1,4 @@ -require 'benchmark' +require 'active_support/core_ext/benchmark' module ActionView module Helpers diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 36e0a78e93..a861102166 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -221,9 +221,9 @@ module ActionView html_options = args.second concat(link_to(capture(&block), options, html_options)) else - name = args.first - options = args.second || {} - html_options = args.third + name = args[0] + options = args[1] || {} + html_options = args[2] url = url_for(options) -- cgit v1.2.3