aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/abstract/base.rb2
-rw-r--r--actionpack/lib/action_controller/abstract/logger.rb4
-rw-r--r--actionpack/lib/action_controller/new_base/http.rb5
-rw-r--r--actionpack/lib/action_controller/routing.rb3
-rw-r--r--actionpack/lib/action_dispatch/http/status_codes.rb6
5 files changed, 16 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/abstract/base.rb b/actionpack/lib/action_controller/abstract/base.rb
index 483356a4be..f2db201063 100644
--- a/actionpack/lib/action_controller/abstract/base.rb
+++ b/actionpack/lib/action_controller/abstract/base.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/module/attr_internal'
+
module AbstractController
class Error < StandardError; end
diff --git a/actionpack/lib/action_controller/abstract/logger.rb b/actionpack/lib/action_controller/abstract/logger.rb
index d0603a4ad7..750a5c9fb6 100644
--- a/actionpack/lib/action_controller/abstract/logger.rb
+++ b/actionpack/lib/action_controller/abstract/logger.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/class/attribute_accessors'
+
module AbstractController
module Logger
extend ActiveSupport::DependencyModule
@@ -39,4 +41,4 @@ module AbstractController
@request_origin ||= "#{request.remote_ip} at #{Time.now.to_s(:db)}"
end
end
-end \ No newline at end of file
+end
diff --git a/actionpack/lib/action_controller/new_base/http.rb b/actionpack/lib/action_controller/new_base/http.rb
index f3a60b3bf8..e9a1d5b12f 100644
--- a/actionpack/lib/action_controller/new_base/http.rb
+++ b/actionpack/lib/action_controller/new_base/http.rb
@@ -1,3 +1,6 @@
+require 'action_controller/abstract'
+require 'active_support/core_ext/module/delegation'
+
module ActionController
class Http < AbstractController::Base
abstract!
@@ -52,7 +55,7 @@ module ActionController
def self.action(name)
@actions ||= {}
- @actions[name] ||= proc do |env|
+ @actions[name.to_s] ||= proc do |env|
new.call(name, env)
end
end
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 06a07a4d0a..ce59866531 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -1,6 +1,9 @@
require 'cgi'
require 'uri'
require 'set'
+
+require 'active_support/core_ext/module/aliasing'
+require 'active_support/core_ext/module/attribute_accessors'
require 'action_controller/routing/optimisations'
require 'action_controller/routing/routing_ext'
require 'action_controller/routing/route'
diff --git a/actionpack/lib/action_dispatch/http/status_codes.rb b/actionpack/lib/action_dispatch/http/status_codes.rb
index 830de2a6db..5bac842ec1 100644
--- a/actionpack/lib/action_dispatch/http/status_codes.rb
+++ b/actionpack/lib/action_dispatch/http/status_codes.rb
@@ -1,3 +1,5 @@
+require 'active_support/inflector'
+
module ActionDispatch
module StatusCodes #:nodoc:
STATUS_CODES = Rack::Utils::HTTP_STATUS_CODES.merge({
@@ -16,7 +18,7 @@ module ActionDispatch
# :created or :not_implemented) into its corresponding HTTP status
# code (like 200 or 501).
SYMBOL_TO_STATUS_CODE = STATUS_CODES.inject({}) { |hash, (code, message)|
- hash[message.gsub(/ /, "").underscore.to_sym] = code
+ hash[ActiveSupport::Inflector.underscore(message.gsub(/ /, "")).to_sym] = code
hash
}.freeze
@@ -37,4 +39,4 @@ module ActionDispatch
end
end
end
-end \ No newline at end of file
+end