Permalink
Browse files

Changes made while working on upgrading cells to Rails 3

  • Loading branch information...
1 parent a975363 commit e57dbfe6af368cca9f4c827eb70937086cbf7ed7 @wycats wycats committed with mikel Jun 2, 2010
@@ -1,4 +1,5 @@
require 'active_support/configurable'
+require 'active_support/core_ext/module/anonymous'
module AbstractController
class Error < StandardError; end
@@ -1,4 +1,5 @@
require "abstract_controller/base"
+require "action_view"
module AbstractController
class DoubleRenderError < Error
@@ -8,10 +8,10 @@ module RackDelegation
delegate :headers, :status=, :location=, :content_type=,
:status, :location, :content_type, :to => "@_response"
- def dispatch(action, request)
- @_response = ActionDispatch::Response.new
- @_response.request = request
- super
+ def dispatch(action, request, response = ActionDispatch::Response.new)
+ @_response ||= response
+ @_response.request ||= request
+ super(action, request)
end
def params
@@ -47,6 +47,7 @@ module RequestForgeryProtection
extend ActiveSupport::Concern
include AbstractController::Helpers
+ include AbstractController::Callbacks
included do
# Sets the token parameter name for RequestForgery. Calling +protect_from_forgery+
@@ -31,6 +31,7 @@ def exists?(*args)
def typecast!
each_with_index do |path, i|
+ path = path.to_s if path.is_a?(Pathname)
next unless path.is_a?(String)
self[i] = FileSystemResolver.new(path)
end

0 comments on commit e57dbfe

Please sign in to comment.