aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-08 13:33:18 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-06-08 13:34:07 -0700
commit86fc43fd584726ba81b1a3b3e0a6f6000c1f4cc8 (patch)
treeae5b6811931cb2903bf3a54a7211316f4e43589e /actionpack/lib
parent00ee990443189649e481b2c30945e7a1029d8280 (diff)
downloadrails-86fc43fd584726ba81b1a3b3e0a6f6000c1f4cc8.tar.gz
rails-86fc43fd584726ba81b1a3b3e0a6f6000c1f4cc8.tar.bz2
rails-86fc43fd584726ba81b1a3b3e0a6f6000c1f4cc8.zip
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
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/routing/resources.rb4
-rw-r--r--actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb1
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb2
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/benchmark_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb6
-rw-r--r--actionpack/lib/action_view/template/error.rb2
7 files changed, 13 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/routing/resources.rb b/actionpack/lib/action_controller/routing/resources.rb
index 05c782d226..2dee0a3d87 100644
--- a/actionpack/lib/action_controller/routing/resources.rb
+++ b/actionpack/lib/action_controller/routing/resources.rb
@@ -150,9 +150,9 @@ module ActionController
end
if only
- @allowed_actions[:only] = Array(only).map(&:to_sym)
+ @allowed_actions[:only] = Array(only).map {|a| a.to_sym }
elsif except
- @allowed_actions[:except] = Array(except).map(&:to_sym)
+ @allowed_actions[:except] = Array(except).map {|a| a.to_sym }
end
end
diff --git a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
index 8f448970d9..1d9efc2b36 100644
--- a/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
+++ b/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
@@ -1,3 +1,4 @@
+require "active_support/core_ext/kernel/requires"
begin
require_library_or_gem 'memcache'
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index bfff307669..036deec6d2 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -1,3 +1,5 @@
+require "active_support/core_ext/exception"
+
module ActionDispatch
class ShowExceptions
include StatusCodes
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)
diff --git a/actionpack/lib/action_view/template/error.rb b/actionpack/lib/action_view/template/error.rb
index a06e80b294..6e5093c5bd 100644
--- a/actionpack/lib/action_view/template/error.rb
+++ b/actionpack/lib/action_view/template/error.rb
@@ -1,3 +1,5 @@
+require "active_support/core_ext/enumerable"
+
module ActionView
# The TemplateError exception is raised when the compilation of the template fails. This exception then gathers a
# bunch of intimate details and uses it to report a very precise exception message.