Skip to content

Commit 93c51f9

Browse files
committed
Rename AJAX to Ajax for consistency [ci-skip]
Currently we use both `AJAX` (11 times) and `Ajax` (22 times). Wikipedia uses `Ajax`: https://en.wikipedia.org/wiki/Ajax_(programming) Mozilla uses `Ajax`: https://developer.mozilla.org/en-US/docs/Web/Guide/AJAX As `Ajax` is currently used the most and it's preferred by Wikipedia and Mozilla, we can change all it's occurences to `Ajax`.
1 parent 2497eb0 commit 93c51f9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

actionview/lib/action_view/helpers/csrf_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module CsrfHelper
1616
#
1717
# You don't need to use these tags for regular forms as they generate their own hidden fields.
1818
#
19-
# For AJAX requests other than GETs, extract the "csrf-token" from the meta-tag and send as the
19+
# For Ajax requests other than GETs, extract the "csrf-token" from the meta-tag and send as the
2020
# "X-CSRF-Token" HTTP header. If you are using rails-ujs this happens automatically.
2121
#
2222
def csrf_meta_tags

guides/source/testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,9 @@ All of request types have equivalent methods that you can use. In a typical C.R.
12861286

12871287
NOTE: Functional tests do not verify whether the specified request type is accepted by the action, we're more concerned with the result. Request tests exist for this use case to make your tests more purposeful.
12881288

1289-
### Testing XHR (AJAX) Requests
1289+
### Testing XHR (Ajax) Requests
12901290

1291-
To test AJAX requests, you can specify the `xhr: true` option to `get`, `post`,
1291+
To test Ajax requests, you can specify the `xhr: true` option to `get`, `post`,
12921292
`patch`, `put`, and `delete` methods. For example:
12931293

12941294
```ruby

railties/lib/rails/generators/rails/app/templates/Gemfile.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ gem "bootsnap", require: false
3434
<% end -%>
3535
<%- if options.api? -%>
3636

37-
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
37+
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin Ajax possible
3838
# gem "rack-cors"
3939
<%- end -%>
4040
<% if RUBY_ENGINE == "ruby" -%>

railties/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Be sure to restart your server when you modify this file.
22

33
# Avoid CORS issues when API is called from the frontend app.
4-
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
4+
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests.
55

66
# Read more: https://github.com/cyu/rack-cors
77

0 commit comments

Comments
 (0)