aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-16 23:24:00 -0700
committerwycats <wycats@gmail.com>2010-03-16 23:24:00 -0700
commitcd9ffd11e13ef6e62eba2cbd5c3760ff04132820 (patch)
tree0fcc940424e1265f03d5df623f324cf7ca310dd3 /actionpack
parentc7388124153e1b1f85965998e5d1c20eed670da8 (diff)
downloadrails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.gz
rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.tar.bz2
rails-cd9ffd11e13ef6e62eba2cbd5c3760ff04132820.zip
Eliminate warnings for AM on 1.8
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/abstract_controller/layouts.rb4
-rw-r--r--actionpack/lib/action_controller/metal.rb6
-rw-r--r--actionpack/lib/action_controller/metal/rack_delegation.rb6
-rw-r--r--actionpack/lib/action_dispatch/http/filter_parameters.rb1
-rw-r--r--actionpack/lib/action_view/helpers/capture_helper.rb2
5 files changed, 12 insertions, 7 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb
index 95a6101109..528a430b04 100644
--- a/actionpack/lib/abstract_controller/layouts.rb
+++ b/actionpack/lib/abstract_controller/layouts.rb
@@ -1,3 +1,5 @@
+require "active_support/core_ext/module/remove_method"
+
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:
@@ -237,6 +239,8 @@ module AbstractController
# name, return that string. Otherwise, use the superclass'
# layout (which might also be implied)
def _write_layout_method
+ remove_possible_method(:_layout)
+
case defined?(@_layout) ? @_layout : nil
when String
self.class_eval %{def _layout; #{@_layout.inspect} end}
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index eebd2c943a..a148c19a31 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -34,7 +34,7 @@ module ActionController
# and response object available. You might wish to control the
# environment and response manually for performance reasons.
- attr_internal :status, :headers, :content_type, :response, :request
+ attr_internal :headers, :response, :request
delegate :session, :to => "@_request"
def initialize(*)
@@ -62,6 +62,10 @@ module ActionController
headers["Location"] = url
end
+ def status
+ @_status
+ end
+
def status=(status)
@_status = Rack::Utils.status_code(status)
end
diff --git a/actionpack/lib/action_controller/metal/rack_delegation.rb b/actionpack/lib/action_controller/metal/rack_delegation.rb
index 37106733cb..060117756e 100644
--- a/actionpack/lib/action_controller/metal/rack_delegation.rb
+++ b/actionpack/lib/action_controller/metal/rack_delegation.rb
@@ -5,10 +5,8 @@ module ActionController
module RackDelegation
extend ActiveSupport::Concern
- included do
- delegate :headers, :status=, :location=, :content_type=,
- :status, :location, :content_type, :to => "@_response"
- end
+ delegate :headers, :status=, :location=, :content_type=,
+ :status, :location, :content_type, :to => "@_response"
def dispatch(action, request)
@_response = ActionDispatch::Response.new
diff --git a/actionpack/lib/action_dispatch/http/filter_parameters.rb b/actionpack/lib/action_dispatch/http/filter_parameters.rb
index 451b79b190..e42b4d09b0 100644
--- a/actionpack/lib/action_dispatch/http/filter_parameters.rb
+++ b/actionpack/lib/action_dispatch/http/filter_parameters.rb
@@ -25,7 +25,6 @@ module ActionDispatch
module FilterParameters
extend ActiveSupport::Concern
- mattr_reader :compiled_parameter_filter_for
@@compiled_parameter_filter_for = {}
# Return a hash of parameters with all sensitive data replaced.
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb
index 42a67756e4..f0be814700 100644
--- a/actionpack/lib/action_view/helpers/capture_helper.rb
+++ b/actionpack/lib/action_view/helpers/capture_helper.rb
@@ -32,7 +32,7 @@ module ActionView
#
def capture(*args)
value = nil
- buffer = with_output_buffer { value = yield *args }
+ buffer = with_output_buffer { value = yield(*args) }
if string = buffer.presence || value and string.is_a?(String)
NonConcattingString.new(string)
end