Rails 2.1.1
Among other things, a security fix.
This commit is contained in:
parent
d2c4c8737c
commit
d4f97345db
354 changed files with 21027 additions and 3072 deletions
|
@ -171,7 +171,7 @@ module ActionController #:nodoc:
|
|||
|
||||
# Was the response successful?
|
||||
def success?
|
||||
response_code == 200
|
||||
(200..299).include?(response_code)
|
||||
end
|
||||
|
||||
# Was the URL not found?
|
||||
|
@ -333,7 +333,7 @@ module ActionController #:nodoc:
|
|||
attr_reader :original_filename
|
||||
|
||||
# The content type of the "uploaded" file
|
||||
attr_reader :content_type
|
||||
attr_accessor :content_type
|
||||
|
||||
def initialize(path, content_type = Mime::TEXT, binary = false)
|
||||
raise "#{path} file does not exist" unless File.exist?(path)
|
||||
|
@ -413,6 +413,8 @@ module ActionController #:nodoc:
|
|||
get(@response.redirected_to.delete(:action), @response.redirected_to.stringify_keys)
|
||||
end
|
||||
|
||||
deprecate :follow_redirect => "If you wish to follow redirects, you should use integration tests"
|
||||
|
||||
def assigns(key = nil)
|
||||
if key.nil?
|
||||
@response.template.assigns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue