提交 40f226ae 编写于 作者: R Ryunosuke Sato

Fix link to rails-ujs

https://github.com/rails/rails-ujs is merged into actionview in favor of https://github.com/rails/rails/pull/28098.
[skip ci]
上级 55ccec63
# #
# Unobtrusive JavaScript # Unobtrusive JavaScript
# https://github.com/rails/rails-ujs # https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
# #
# Released under the MIT license # Released under the MIT license
# #
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
}, },
"scripts": { "scripts": {
"build": "bundle exec blade build", "build": "bundle exec blade build",
"test": "echo \"See the README: https://github.com/rails/rails-ujs#how-to-run-tests\" && exit 1", "test": "echo \"See the README: https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts#how-to-run-tests\" && exit 1",
"lint": "coffeelint app/assets/javascripts && eslint test/public/test" "lint": "coffeelint app/assets/javascripts && eslint test/public/test"
}, },
"repository": { "repository": {
......
...@@ -550,7 +550,7 @@ url helper. ...@@ -550,7 +550,7 @@ url helper.
<%= user_url(@user, host: 'example.com') %> <%= user_url(@user, host: 'example.com') %>
``` ```
NOTE: non-`GET` links require [rails-ujs](https://github.com/rails/rails-ujs) or NOTE: non-`GET` links require [rails-ujs](https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts) or
[jQuery UJS](https://github.com/rails/jquery-ujs), and won't work in mailer templates. [jQuery UJS](https://github.com/rails/jquery-ujs), and won't work in mailer templates.
They will result in normal `GET` requests. They will result in normal `GET` requests.
......
...@@ -257,7 +257,7 @@ protect_from_forgery with: :exception ...@@ -257,7 +257,7 @@ protect_from_forgery with: :exception
This will automatically include a security token in all forms and Ajax requests generated by Rails. If the security token doesn't match what was expected, an exception will be thrown. This will automatically include a security token in all forms and Ajax requests generated by Rails. If the security token doesn't match what was expected, an exception will be thrown.
NOTE: By default, Rails includes an [unobtrusive scripting adapter](https://github.com/rails/rails-ujs), NOTE: By default, Rails includes an [unobtrusive scripting adapter](https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts),
which adds a header called `X-CSRF-Token` with the security token on every non-GET which adds a header called `X-CSRF-Token` with the security token on every non-GET
Ajax call. Without this header, non-GET Ajax requests won't be accepted by Rails. Ajax call. Without this header, non-GET Ajax requests won't be accepted by Rails.
When using another library to make Ajax calls, it is necessary to add the security When using another library to make Ajax calls, it is necessary to add the security
......
...@@ -149,7 +149,7 @@ Because of Unobtrusive JavaScript, the Rails "Ajax helpers" are actually in two ...@@ -149,7 +149,7 @@ Because of Unobtrusive JavaScript, the Rails "Ajax helpers" are actually in two
parts: the JavaScript half and the Ruby half. parts: the JavaScript half and the Ruby half.
Unless you have disabled the Asset Pipeline, Unless you have disabled the Asset Pipeline,
[rails-ujs](https://github.com/rails/rails-ujs/blob/master/src/rails-ujs.coffee) [rails-ujs](https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts/rails-ujs.coffee)
provides the JavaScript half, and the regular Ruby view helpers add appropriate provides the JavaScript half, and the regular Ruby view helpers add appropriate
tags to your DOM. tags to your DOM.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册