diff options
author | José Valim <jose.valim@gmail.com> | 2010-02-26 11:51:21 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-02-26 11:51:21 +0100 |
commit | bd36418c512acb62c5515a6cbde79ce59dd67b46 (patch) | |
tree | ec2e66ce73454f638d6d9ab9abdac9cf55b0f3bf /actionpack/lib/abstract_controller | |
parent | 4db72b702f7faca7da30a64e45daeee13733762a (diff) | |
download | rails-bd36418c512acb62c5515a6cbde79ce59dd67b46.tar.gz rails-bd36418c512acb62c5515a6cbde79ce59dd67b46.tar.bz2 rails-bd36418c512acb62c5515a6cbde79ce59dd67b46.zip |
Fix controller_path returnsing an empty string in Ruby 1.8.7 [#4036 status:resolved]
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/helpers.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/logger.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 4 |
5 files changed, 4 insertions, 12 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index 3119ee498b..e14818e464 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -84,7 +84,7 @@ module AbstractController # ==== Returns # String def controller_path - @controller_path ||= name && name.sub(/Controller$/, '').underscore + @controller_path ||= name.sub(/Controller$/, '').underscore unless anonymous? end end diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index ca3a7550e5..f875213afb 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -1,7 +1,4 @@ require 'active_support/dependencies' -require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/module/delegation' -require 'active_support/core_ext/module/anonymous' module AbstractController module Helpers diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 0d214396aa..beda4e633e 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -1,6 +1,3 @@ -require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/module/delegation' - module AbstractController # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in # repeated setups. The inclusion pattern has pages that look like this: diff --git a/actionpack/lib/abstract_controller/logger.rb b/actionpack/lib/abstract_controller/logger.rb index a23a13e1d6..9318f5e369 100644 --- a/actionpack/lib/abstract_controller/logger.rb +++ b/actionpack/lib/abstract_controller/logger.rb @@ -1,5 +1,5 @@ -require 'active_support/core_ext/logger' -require 'active_support/benchmarkable' +require "active_support/core_ext/logger" +require "active_support/benchmarkable" module AbstractController module Logger diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 14f51ae1bf..32fdf821a7 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -1,7 +1,5 @@ require "abstract_controller/base" -require 'active_support/core_ext/class/attribute' -require 'active_support/core_ext/module/delegation' -require 'active_support/core_ext/array/wrap' +require "active_support/core_ext/array/wrap" module AbstractController class DoubleRenderError < Error |