Skip to content

Commit

Permalink
Fixed some deprecation warnings in ActionPack [Rick Olson]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
technoweenie committed Sep 30, 2006
1 parent 52547f5 commit 3010e30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Fixed some deprecation warnings in ActionPack [Rick Olson]

* assert_select_rjs decodes escaped unicode chars since the Javascript generators encode them. #6240 [japgolly]

* Deprecation: @cookies, @headers, @request, @response will be removed after 1.2. Use the corresponding method instead. [Jeremy Kemper]
Expand Down
5 changes: 2 additions & 3 deletions actionpack/lib/action_controller/caching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def cache_page(content = nil, options = {})

private
def caching_allowed
!@request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400
!request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400
end
end

Expand Down Expand Up @@ -559,8 +559,7 @@ def cache_sweeper(*sweepers)
return unless perform_caching
configuration = sweepers.last.is_a?(Hash) ? sweepers.pop : {}
sweepers.each do |sweeper|
observer(sweeper)

ActiveRecord::Base.observers << sweeper if defined?(ActiveRecord) and defined?(ActiveRecord::Base)
sweeper_instance = Object.const_get(Inflector.classify(sweeper)).instance

if sweeper_instance.is_a?(Sweeper)
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/rescue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def rescue_action_in_public(exception) #:doc:
# the remote IP being 127.0.0.1. For example, this could include the IP of the developer machine when debugging
# remotely.
def local_request? #:doc:
[@request.remote_addr, @request.remote_ip] == ["127.0.0.1"] * 2
[request.remote_addr, request.remote_ip] == ["127.0.0.1"] * 2
end

# Renders a detailed diagnostics screen on action exceptions.
Expand Down

0 comments on commit 3010e30

Please sign in to comment.