提交 51a2f7bb 编写于 作者: T Tom Kadwill

Actionpack documentation typos [ci skip]

上级 0f8eefa6
......@@ -2,17 +2,17 @@
require 'active_support/core_ext/hash/slice'
module ActionController
# This module provides a method which will redirect browser to use HTTPS
# This module provides a method which will redirect the browser to use HTTPS
# protocol. This will ensure that user's sensitive information will be
# transferred safely over the internet. You _should_ always force browser
# transferred safely over the internet. You _should_ always force the browser
# to use HTTPS when you're transferring sensitive information such as
# user authentication, account information, or credit card information.
#
# Note that if you are really concerned about your application security,
# you might consider using +config.force_ssl+ in your config file instead.
# That will ensure all the data transferred via HTTPS protocol and prevent
# user from getting session hijacked when accessing the site under unsecured
# HTTP protocol.
# the user from getting their session hijacked when accessing the site over
# unsecured HTTP protocol.
module ForceSSL
extend ActiveSupport::Concern
include AbstractController::Callbacks
......
......@@ -310,9 +310,9 @@ def nonce(secret_key, time = Time.now)
end
# Might want a shorter timeout depending on whether the request
# is a PATCH, PUT, or POST, and if client is browser or web service.
# is a PATCH, PUT, or POST, and if the client is a browser or web service.
# Can be much shorter if the Stale directive is implemented. This would
# allow a user to use new nonce without prompting user again for their
# allow a user to use new nonce without prompting the user again for their
# username and password.
def validate_nonce(secret_key, request, value, seconds_to_timeout=5*60)
return false if value.nil?
......
......@@ -75,8 +75,8 @@ def halted_callback_hook(filter)
ActiveSupport::Notifications.instrument("halted_callback.action_controller", :filter => filter)
end
# A hook which allows you to clean up any time taken into account in
# views wrongly, like database querying time.
# A hook which allows you to clean up any time, wrongly taken into account in
# views, like database querying time.
#
# def cleanup_view_runtime
# super - time_taken_in_something_expensive
......
......@@ -3,7 +3,7 @@
require 'active_support/json'
module ActionController
# Mix this module in to your controller, and all actions in that controller
# Mix this module into your controller, and all actions in that controller
# will be able to stream data to the client as it's written.
#
# class MyController < ActionController::Base
......@@ -20,7 +20,7 @@ module ActionController
# end
# end
#
# There are a few caveats with this use. You *cannot* write headers after the
# There are a few caveats with this module. You *cannot* write headers after the
# response has been committed (Response#committed? will return truthy).
# Calling +write+ or +close+ on the response stream will cause the response
# object to be committed. Make sure all headers are set before calling write
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册