Improve some wording and correct some typos (#1336)

* Unification of words "behaviour" -> "behavior"

* Unify format

- `a`, `b`, `c` -> `A`, `B`, `C`
- D -> `D`

* Fix typo "againt" -> "against"

* Fix typo "Passanger" -> "Passenger"

* Fix typo "qeury" -> "query"
This commit is contained in:
Yudai Takada 2022-06-09 02:28:01 +09:00 committed by GitHub
parent 887b410e38
commit d8068565d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -50,7 +50,7 @@ This may be disabled by setting the `strip_whitespace` option in a Ransack initi
```ruby
Ransack.configure do |c|
# Change whitespace stripping behaviour.
# Change whitespace stripping behavior.
# Default is true
c.strip_whitespace = false
end

View File

@ -67,24 +67,24 @@ When you're writing a `Ransack` search form, you can choose any of the following
### Option A - Match keys exactly
Option `a` will match keys exactly. This is the solution to choose if you want to distinguish 'Home' from 'Homework': searching for 'Home' will return just the `Task` with id 1. It also allows searching for more than one tag at once (comma separated):
Option `A` will match keys exactly. This is the solution to choose if you want to distinguish 'Home' from 'Homework': searching for 'Home' will return just the `Task` with id 1. It also allows searching for more than one tag at once (comma separated):
- `Home, Personal` will return task 1
- `Home, Homework` will return task 1 and 2
### Option B - match key combinations
Option `b` will match all keys exactly. This is the solution if you wanna search for specific combinations of tags:
Option `B` will match all keys exactly. This is the solution if you wanna search for specific combinations of tags:
- `Home` will return nothing, as there is no Task with just the `Home` tag
- `Home, Personal` will return task 1
### Option C - match substrings
Option `c` is used to match substrings. This is useful when you don't care for the exact tag, but only for part of it:
Option `C` is used to match substrings. This is useful when you don't care for the exact tag, but only for part of it:
- `Home` will return task 1 and 2 (`/Home/` matches both `"Home"` and `"Homework"`)
### Option D - select from a list of tags
In Option D we allow the user to select a list of valid tags and then search againt them. We use the plural name here.
In Option `D` we allow the user to select a list of valid tags and then search against them. We use the plural name here.
```erb
<div class='form-group'>

View File

@ -27,7 +27,7 @@ en:
gt: greater than
lt: less than
models:
person: Passanger
person: Passenger
attributes:
person:
name: Full Name

View File

@ -368,7 +368,7 @@ module Ransack
expect(@s.result.to_sql).to match /#{field} IS NULL/
end
describe 'with association qeury' do
describe 'with association query' do
it 'generates a value IS NOT NULL query' do
@s.comments_id_not_null = true
sql = @s.result.to_sql