chore: fix spelling
This commit is contained in:
parent
56f376c753
commit
1825c2b6c5
|
@ -94,7 +94,7 @@ class FilterTest < ActionController::TestCase
|
|||
|
||||
private
|
||||
def unreached_prepend_after_action
|
||||
@ran_filter << "unreached_preprend_after_action_after_render"
|
||||
@ran_filter << "unreached_prepend_after_action_after_render"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -752,13 +752,13 @@ class FilterTest < ActionController::TestCase
|
|||
assert_equal %w( before_action_redirects ), @controller.instance_variable_get(:@ran_filter)
|
||||
end
|
||||
|
||||
def test_before_action_rendering_breaks_actioning_chain_for_preprend_after_action
|
||||
def test_before_action_rendering_breaks_actioning_chain_for_prepend_after_action
|
||||
test_process(RenderingForPrependAfterActionController)
|
||||
assert_equal %w( before_action_rendering ), @controller.instance_variable_get(:@ran_filter)
|
||||
assert_not @controller.instance_variable_defined?(:@ran_action)
|
||||
end
|
||||
|
||||
def test_before_action_redirects_breaks_actioning_chain_for_preprend_after_action
|
||||
def test_before_action_redirects_breaks_actioning_chain_for_prepend_after_action
|
||||
test_process(BeforeActionRedirectionForPrependAfterActionController)
|
||||
assert_response :redirect
|
||||
assert_equal "http://test.host/filter_test/before_action_redirection_for_prepend_after_action/target_of_redirection", redirect_to_url
|
||||
|
|
|
@ -23,7 +23,7 @@ class LogOnUnpermittedParamsTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
test "logs on unexpected params" do
|
||||
request_params = { book: { pages: 65 }, fishing: "Turnips", car: "Mersedes" }
|
||||
request_params = { book: { pages: 65 }, fishing: "Turnips", car: "Mercedes" }
|
||||
context = { "action" => "my_action", "controller" => "my_controller" }
|
||||
params = ActionController::Parameters.new(request_params, context)
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ class RedirectController < ActionController::Base
|
|||
def rescue_errors(e) raise e end
|
||||
|
||||
private
|
||||
def dashbord_url(id, message)
|
||||
def dashboard_url(id, message)
|
||||
url_for action: "dashboard", params: { "id" => id, "message" => message }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -173,7 +173,7 @@ class RoutingAssertionsTest < ActionController::TestCase
|
|||
assert_match err.message, "This is a really bad msg"
|
||||
end
|
||||
|
||||
def test_assert_recognizes_continue_to_recoginize_after_it_tried_engines
|
||||
def test_assert_recognizes_continue_to_recognize_after_it_tried_engines
|
||||
assert_recognizes({ controller: "query_articles", action: "index" }, "/shelf/foo")
|
||||
end
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ This will put the guides inside `Rails.root/doc/guides` and you may start surfin
|
|||
Better integration with HTTP : Out of the box ETag support
|
||||
----------------------------------------------------------
|
||||
|
||||
Supporting the etag and last modified timestamp in HTTP headers means that Rails can now send back an empty response if it gets a request for a resource that hasn't been modified lately. This allows you to check whether a response needs to be sent at all.
|
||||
Supporting the ETag and last modified timestamp in HTTP headers means that Rails can now send back an empty response if it gets a request for a resource that hasn't been modified lately. This allows you to check whether a response needs to be sent at all.
|
||||
|
||||
```ruby
|
||||
class ArticlesController < ApplicationController
|
||||
|
|
|
@ -570,7 +570,7 @@ Conditional GET support
|
|||
|
||||
Conditional GETs are a feature of the HTTP specification that provide a way for web servers to tell browsers that the response to a GET request hasn't changed since the last request and can be safely pulled from the browser cache.
|
||||
|
||||
They work by using the `HTTP_IF_NONE_MATCH` and `HTTP_IF_MODIFIED_SINCE` headers to pass back and forth both a unique content identifier and the timestamp of when the content was last changed. If the browser makes a request where the content identifier (etag) or last modified since timestamp matches the server's version then the server only needs to send back an empty response with a not modified status.
|
||||
They work by using the `HTTP_IF_NONE_MATCH` and `HTTP_IF_MODIFIED_SINCE` headers to pass back and forth both a unique content identifier and the timestamp of when the content was last changed. If the browser makes a request where the content identifier (ETag) or last modified since timestamp matches the server's version then the server only needs to send back an empty response with a not modified status.
|
||||
|
||||
It is the server's (i.e. our) responsibility to look for a last modified timestamp and the if-none-match header and determine whether or not to send back the full response. With conditional-get support in Rails this is a pretty easy task:
|
||||
|
||||
|
|
Loading…
Reference in New Issue