chore: fix grammar and spelling
This commit is contained in:
parent
a27c9eeddb
commit
13b1d9dc35
|
@ -123,7 +123,7 @@
|
|||
* Allow applications to configure the thread pool for async queries
|
||||
|
||||
Some applications may want one thread pool per database whereas others want to use
|
||||
a single global thread pool for all queries. By default Rails will set `async_query_executor`
|
||||
a single global thread pool for all queries. By default, Rails will set `async_query_executor`
|
||||
to `nil` which will not initialize any executor. If `load_async` is called and no executor
|
||||
has been configured, the query will be executed in the foreground.
|
||||
|
||||
|
@ -212,7 +212,7 @@
|
|||
present in the simplified query, an ActiveRecord::InvalidStatement
|
||||
error was raised.
|
||||
|
||||
An sample query affected by this problem:
|
||||
A sample query affected by this problem:
|
||||
|
||||
```ruby
|
||||
Author.select('COUNT(*) as total_posts', 'authors.*')
|
||||
|
@ -252,7 +252,7 @@
|
|||
|
||||
* `ActiveRecord::Calculations.calculate` called with `:average`
|
||||
(aliased as `ActiveRecord::Calculations.average`) will now use column based
|
||||
type casting. This means that floating point number columns will now be
|
||||
type casting. This means that floating-point number columns will now be
|
||||
aggregated as `Float` and decimal columns will be aggregated as `BigDecimal`.
|
||||
|
||||
Integers are handled as a special case returning `BigDecimal` always
|
||||
|
@ -306,7 +306,7 @@
|
|||
When an application boots it automatically connects to the primary or first database in the
|
||||
database configuration file. In a multiple database application that then call `connects_to`
|
||||
needs to know that the default connection is the same as the `ApplicationRecord` connection.
|
||||
However some applications have a differently named `ApplicationRecord`. This prevents Active
|
||||
However, some applications have a differently named `ApplicationRecord`. This prevents Active
|
||||
Record from opening duplicate connections to the same database.
|
||||
|
||||
*Eileen M. Uchitelle*, *John Crepezzi*
|
||||
|
|
|
@ -1062,7 +1062,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
|
|||
|
||||
def test_eager_with_floating_point_numbers
|
||||
assert_queries(2) do
|
||||
# Before changes, the floating point numbers will be interpreted as table names and will cause this to run in one query
|
||||
# Before changes, the floating-point numbers will be interpreted as table names and will cause this to run in one query
|
||||
Comment.all.merge!(where: "123.456 = 123.456", includes: :post).to_a
|
||||
end
|
||||
end
|
||||
|
|
|
@ -446,7 +446,7 @@ module ActiveSupport
|
|||
[time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone]
|
||||
end
|
||||
|
||||
# Returns the object's date and time as a floating point number of seconds
|
||||
# Returns the object's date and time as a floating-point number of seconds
|
||||
# since the Epoch (January 1, 1970 00:00 UTC).
|
||||
#
|
||||
# Time.zone.now.to_f # => 1417709320.285418
|
||||
|
|
|
@ -19,7 +19,7 @@ class BacktraceCleanerFilterTest < ActiveSupport::TestCase
|
|||
assert_equal "/my/prefix/my/class.rb", @bc.clean(["/my/prefix/my/class.rb"]).first
|
||||
end
|
||||
|
||||
test "backtrace should contain unaltered lines if they dont match a filter" do
|
||||
test "backtrace should contain unaltered lines if they don't match a filter" do
|
||||
assert_equal "/my/other_prefix/my/class.rb", @bc.clean([ "/my/other_prefix/my/class.rb" ]).first
|
||||
end
|
||||
end
|
||||
|
|
|
@ -318,7 +318,7 @@ class DurationTest < ActiveSupport::TestCase
|
|||
Time.zone = nil
|
||||
end
|
||||
|
||||
def test_before_and_afer
|
||||
def test_before_and_after
|
||||
t = Time.local(2000)
|
||||
assert_equal t + 1, 1.second.after(t)
|
||||
assert_equal t - 1, 1.second.before(t)
|
||||
|
|
|
@ -120,9 +120,9 @@ class TimeWithZoneTest < ActiveSupport::TestCase
|
|||
nsec = ActiveSupport::TimeWithZone.new(nsec, @time_zone)
|
||||
assert_equal "Fri, 12 Dec 1986 01:23:00.000000001 EST -05:00", nsec.inspect
|
||||
|
||||
handred_nsec = Time.utc(1986, 12, 12, 6, 23, 00, Rational(100, 1000))
|
||||
handred_nsec = ActiveSupport::TimeWithZone.new(handred_nsec, @time_zone)
|
||||
assert_equal "Fri, 12 Dec 1986 01:23:00.000000100 EST -05:00", handred_nsec.inspect
|
||||
hundred_nsec = Time.utc(1986, 12, 12, 6, 23, 00, Rational(100, 1000))
|
||||
hundred_nsec = ActiveSupport::TimeWithZone.new(hundred_nsec, @time_zone)
|
||||
assert_equal "Fri, 12 Dec 1986 01:23:00.000000100 EST -05:00", hundred_nsec.inspect
|
||||
|
||||
one_third_sec = Time.utc(1986, 12, 12, 6, 23, 00, Rational(1000000, 3))
|
||||
one_third_sec = ActiveSupport::TimeWithZone.new(one_third_sec, @time_zone)
|
||||
|
|
|
@ -32,7 +32,7 @@ SCENARIOS = {
|
|||
"Empty" => "",
|
||||
"Single Space" => " ",
|
||||
"Two Spaces" => " ",
|
||||
"Mixed Whitspaces" => " \t\r\n",
|
||||
"Mixed Whitespaces" => " \t\r\n",
|
||||
"Very Long String" => " " * 100
|
||||
}
|
||||
|
||||
|
|
|
@ -2216,7 +2216,7 @@ If you want to see the average of a certain number in one of your tables you can
|
|||
Order.average("subtotal")
|
||||
```
|
||||
|
||||
This will return a number (possibly a floating point number such as 3.14159265) representing the average value in the field.
|
||||
This will return a number (possibly a floating-point number such as 3.14159265) representing the average value in the field.
|
||||
|
||||
For options, please see the parent section, [Calculations](#calculations).
|
||||
|
||||
|
|
|
@ -2150,7 +2150,7 @@ Extensions to `BigDecimal`
|
|||
|
||||
### `to_s`
|
||||
|
||||
The method `to_s` provides a default specifier of "F". This means that a simple call to `to_s` will result in floating point representation instead of engineering notation:
|
||||
The method `to_s` provides a default specifier of "F". This means that a simple call to `to_s` will result in floating-point representation instead of engineering notation:
|
||||
|
||||
```ruby
|
||||
BigDecimal(5.00, 6).to_s # => "5.0"
|
||||
|
|
|
@ -173,7 +173,7 @@ module ApplicationTests
|
|||
db_create_and_drop("db/development.sqlite3", environment_loaded: false)
|
||||
end
|
||||
|
||||
test "db:create and db:drop dont raise errors when loading YAML with single-line ERB" do
|
||||
test "db:create and db:drop don't raise errors when loading YAML with single-line ERB" do
|
||||
app_file "config/database.yml", <<-YAML
|
||||
development:
|
||||
<%= Rails.application.config.database ? 'database: db/development.sqlite3' : 'database: db/development.sqlite3' %>
|
||||
|
|
|
@ -772,7 +772,7 @@ module ApplicationTests
|
|||
db_create_and_drop_namespace("primary", "db/development.sqlite3")
|
||||
end
|
||||
|
||||
test "db:create and db:drop dont raise errors when loading YAML with single-line ERB" do
|
||||
test "db:create and db:drop don't raise errors when loading YAML with single-line ERB" do
|
||||
app_file "config/database.yml", <<-YAML
|
||||
development:
|
||||
primary:
|
||||
|
|
|
@ -147,7 +147,7 @@ module RailtiesTest
|
|||
end
|
||||
end
|
||||
|
||||
test "dont reverse default railties order" do
|
||||
test "don't reverse default railties order" do
|
||||
@api = engine "api" do |plugin|
|
||||
plugin.write "lib/api.rb", <<-RUBY
|
||||
module Api
|
||||
|
|
Loading…
Reference in New Issue