1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request from tricknotes/fix-link-to-rails-ujs

Fix link to rails-ujs
This commit is contained in:
Rafael França 2017-03-29 12:23:06 -04:00 committed by GitHub
commit 842f67dd24
5 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
#
# Unobtrusive JavaScript
# https://github.com/rails/rails-ujs
# https://github.com/rails/rails/blob/master/actionview/app/assets/javascripts
#
# Released under the MIT license
#

View file

@ -11,7 +11,7 @@
},
"scripts": {
"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"
},
"repository": {

View file

@ -550,7 +550,7 @@ url helper.
<%= 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.
They will result in normal `GET` requests.

View file

@ -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.
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
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

View file

@ -149,7 +149,7 @@ Because of Unobtrusive JavaScript, the Rails "Ajax helpers" are actually in two
parts: the JavaScript half and the Ruby half.
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
tags to your DOM.