Skip to content

Commit ffe001f

Browse files
committed
Changes made while working on upgrading cells to Rails 3
1 parent 26c5680 commit ffe001f

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

actionpack/lib/abstract_controller/base.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'active_support/configurable'
2+
require 'active_support/core_ext/module/anonymous'
23

34
module AbstractController
45
class Error < StandardError; end

actionpack/lib/abstract_controller/rendering.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require "abstract_controller/base"
2+
require "action_view"
23

34
module AbstractController
45
class DoubleRenderError < Error

actionpack/lib/action_controller/metal/rack_delegation.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ module RackDelegation
88
delegate :headers, :status=, :location=, :content_type=,
99
:status, :location, :content_type, :to => "@_response"
1010

11-
def dispatch(action, request)
12-
@_response = ActionDispatch::Response.new
13-
@_response.request = request
14-
super
11+
def dispatch(action, request, response = ActionDispatch::Response.new)
12+
@_response ||= response
13+
@_response.request ||= request
14+
super(action, request)
1515
end
1616

1717
def params

actionpack/lib/action_controller/metal/request_forgery_protection.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module RequestForgeryProtection
4747
extend ActiveSupport::Concern
4848

4949
include AbstractController::Helpers
50+
include AbstractController::Callbacks
5051

5152
included do
5253
# Sets the token parameter name for RequestForgery. Calling +protect_from_forgery+

actionpack/lib/action_view/paths.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def exists?(*args)
3131

3232
def typecast!
3333
each_with_index do |path, i|
34+
path = path.to_s if path.is_a?(Pathname)
3435
next unless path.is_a?(String)
3536
self[i] = FileSystemResolver.new(path)
3637
end

0 commit comments

Comments
 (0)