bugfix: when h was nil (which it was for all my tests), everyone would fail with nil.[]= errors. Making sure we at least have a blank hash fixes this.
This commit is contained in:
parent
2562942b6d
commit
0938c6dafc
@ -91,6 +91,7 @@ module ActionController #:nodoc:
|
||||
def follow_redirect_with_headers(h = {})
|
||||
raise "Not a redirect! #{@status} #{@status_message}" unless redirect?
|
||||
|
||||
h = Hash.new if h.nil?
|
||||
h['HTTP_REFERER'] = request.url
|
||||
|
||||
location = headers["location"]
|
||||
|
Loading…
Reference in New Issue
Block a user