1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

extract response setting to a method

This commit is contained in:
Aaron Patterson 2012-07-02 14:01:42 -07:00
parent b7a4fe18f2
commit 46eba6c30f

View file

@ -9,8 +9,7 @@ module ActionController
:status, :location, :content_type, :to => "@_response" :status, :location, :content_type, :to => "@_response"
def dispatch(action, request) def dispatch(action, request)
@_response = ActionDispatch::Response.new set_response!(request)
@_response.request = request
super(action, request) super(action, request)
end end
@ -22,5 +21,12 @@ module ActionController
def reset_session def reset_session
@_request.reset_session @_request.reset_session
end end
private
def set_response!(request)
@_response = ActionDispatch::Response.new
@_response.request = request
end
end end
end end