| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Since everything goes through a `run` method, we can pull the buffer
assignment up.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Methods created by views should always be evaluated against an AV::Base
instance. This way we can extract and refactor things in to classes.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This pulls the "output buffer existence" conditional up. Instead of
evaling the same conditional over and over, we can pull it in to "only
compiled once" Ruby code.
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | | |
Replaced webserver with web server
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| |_|_|/ / / / /
|/| | | | | | | |
Alias case nodes
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When `Arel` was merged into `ActiveRecord` we lost the ability to alias case nodes. This adds it back.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Fix year value when casting a multiparameter time hash
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When assigning a hash to a time attribute that's missing a year
component (e.g. a `time_select` with `:ignore_date` set to `true`)
then the year defaults to 1970 instead of the expected 2000. This
results in the attribute changing as a result of the save.
Before:
event = Event.new(start_time: { 4 => 20, 5 => 30 })
event.start_time # => 1970-01-01 20:30:00 UTC
event.save
event.reload
event.start_time # => 2000-01-01 20:30:00 UTC
After:
event = Event.new(start_time: { 4 => 20, 5 => 30 })
event.start_time # => 2000-01-01 20:30:00 UTC
event.save
event.reload
event.start_time # => 2000-01-01 20:30:00 UTC
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add Channel tests to `rails stats`
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Rails generates `test/channels`(#34933) and
even allows `rails test:channels` (#34947).
`rails stats` has been providing info about `app/channels`,
it makes sense to add `test/channels` as well.
(I've changed test because we generate `test/channels` with some code)
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | | |
bogdanvlviv/add-missing-entries-to-guides-changelog-file
Add missing entries to guides' changelog file [ci skip]
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We added "Action Mailbox Basics", "Action Text Overview" guides(#34812, #34878)
I think it makes to mention about it in the changelog file. (Similar to 7200ec92f8)
Note that entries retain original author since
I just moved content from readme files to the guides.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix ArgumentError when using S3Service
|
| | |_|/ / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Report statistics for app/mailboxes
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Update "Development Dependencies Install" guide [ci skip]
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since we use [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/)
`yarn install` from the root should install all the javascript dependencies.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Since #31230, `change_column` is executed as a bulk statement.
That caused incorrect type casting column default by looking up the
before changed type, not the after changed type.
In a bulk statement, we can't use `change_column_default_for_alter` if
the statement changes the column type.
This fixes the type casting to use the constructed target sql_type.
Fixes #34938.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Enclosing body tag in conductor layout.
|
|/ / / / / / / |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Fix that adding attachments lose a body
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Bump RuboCop to 0.63.0
|
| | |_|_|/ /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
### Summary
RuboCop 0.63.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.63.0
And rubocop-0-63 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.83.0
Currently, RuboCop version specified for Gemfile.lock (0.61) and
Code Climate (0.60) are different.
- https://github.com/rails/rails/blob/v6.0.0.beta1/Gemfile.lock#L407
- https://github.com/rails/rails/blob/v6.0.0.beta1/.codeclimate.yml#L26
This PR matches these versions to 0.63.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/rails/rails/blob/v6.0.0.beta1/actionview/CHANGELOG.md
[ci skip]
|
| | | | | |
|
| | | | | |
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
activerecord: Fix where nil condition on composed_of attribute
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
kamipo/all_of_queries_should_return_correct_result
All of queries should return correct result even if including large number
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since 31ffbf8d, finder methods no longer raise `RangeError`. So
`StatementCache#execute` is the only place to raise the exception for
finder queries.
`StatementCache` is used for simple equality queries in the codebase.
This means that if `StatementCache#execute` raises `RangeError`, the
result could always be regarded as empty.
So `StatementCache#execute` just return nil in that range error case,
and treat that as empty in the caller side, then we can avoid catching
the exception in much places.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently several queries cannot return correct result due to incorrect
`RangeError` handling.
First example:
```ruby
assert_equal true, Topic.where(id: [1, 9223372036854775808]).exists?
assert_equal true, Topic.where.not(id: 9223372036854775808).exists?
```
The first example is obviously to be true, but currently it returns
false.
Second example:
```ruby
assert_equal topics(:first), Topic.where(id: 1..9223372036854775808).find(1)
```
The second example also should return the object, but currently it
raises `RecordNotFound`.
It can be seen from the examples, the queries including large number
assuming empty result is not always correct.
Therefore, This change handles `RangeError` to generate executable SQL
instead of raising `RangeError` to users to always return correct
result. By this change, it is no longer raised `RangeError` to users.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Typo fixes in action cable.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Faster and better memory efficient Date#advance
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Memory comparison:
Options: {:years=>1, :months=>1, :weeks=>1, :days=>1}
Calculating -------------------------------------
master 576.000 memsize ( 0.000 retained)
5.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
advance_no_dup 288.000 memsize ( 0.000 retained)
4.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
Comparison:
advance_no_dup: 288 allocated
master: 576 allocated - 2.00x more
Options: {:years=>1}
Calculating -------------------------------------
master 264.000 memsize ( 0.000 retained)
2.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
advance_no_dup 72.000 memsize ( 0.000 retained)
1.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
Comparison:
advance_no_dup: 72 allocated
master: 264 allocated - 3.67x more
Options: {:weeks=>1}
Calculating -------------------------------------
master 264.000 memsize ( 0.000 retained)
2.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
advance_no_dup 72.000 memsize ( 0.000 retained)
1.000 objects ( 0.000 retained)
0.000 strings ( 0.000 retained)
Comparison:
advance_no_dup: 72 allocated
master: 264 allocated - 3.67x more
Peformance comparison:
Options: {:years=>1, :months=>1, :weeks=>1, :days=>1}
Warming up --------------------------------------
master 27.740k i/100ms
advance_no_dup 37.705k i/100ms
Calculating -------------------------------------
master 338.511k (± 5.9%) i/s - 1.692M in 5.020333s
advance_no_dup 572.980k (± 3.7%) i/s - 2.866M in 5.008680s
Comparison:
advance_no_dup: 572979.7 i/s
master: 338510.9 i/s - 1.69x slower
Options: {:years=>1}
Warming up --------------------------------------
master 53.313k i/100ms
advance_no_dup 115.016k i/100ms
Calculating -------------------------------------
master 639.715k (± 1.7%) i/s - 3.199M in 5.001851s
advance_no_dup 1.579M (± 6.4%) i/s - 7.936M in 5.053876s
Comparison:
advance_no_dup: 1579251.7 i/s
master: 639714.8 i/s - 2.47x slower
Options: {:weeks=>1}
Warming up --------------------------------------
master 57.353k i/100ms
advance_no_dup 129.141k i/100ms
Calculating -------------------------------------
master 674.113k (± 3.4%) i/s - 3.384M in 5.025973s
advance_no_dup 1.911M (± 2.5%) i/s - 9.556M in 5.004496s
Comparison:
advance_no_dup: 1910739.3 i/s
master: 674112.6 i/s - 2.83x slower
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Fix error message when adapter is not specified
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When we added support for multiple databases through a 3-tiered config
and configuration objects this error message got a bit convoluted.
Previously if you had an application with a missing configuation and
multiple databases the error message would look like this:
```
'doesnexist' database is not configured. Available: development,
development, test, test, production, production
(ActiveRecord::AdapterNotSpecified)
```
That's not very descriptive since it duplicates the environments
(because there are multiple databases per environment for this
application).
To fix this I've constructed a bit more readable error message which now
reads like this if you have a multi db app:
```
The `doesntexist` database is not configured for the `production`
environment. (ActiveRecord::AdapterNotSpecified)
Available databases configurations are:
development: primary, primary_readonly
test: primary, primary_readonly
production: primary, primary_readonly
```
And like this if you have a single db app:
```
The `doesntexist` database is not configured for the `production`
environment. (ActiveRecord::AdapterNotSpecified)
Available databases configurations are:
development
test
```
This makes the error message more readable and presents the user all
available options for the database connections.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The `unboundable?` behaves like the `infinite?`.
```ruby
inf = Topic.predicate_builder.build_bind_attribute(:id, Float::INFINITY)
inf.infinite? # => 1
oob = Topic.predicate_builder.build_bind_attribute(:id, 9999999999999999999999999999999)
oob.unboundable? # => 1
inf = Topic.predicate_builder.build_bind_attribute(:id, -Float::INFINITY)
inf.infinite? # => -1
oob = Topic.predicate_builder.build_bind_attribute(:id, -9999999999999999999999999999999)
oob.unboundable? # => -1
```
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit fa791fb8e2a718b5d0430c7ca5a454678dfc192d.
Reason: `server` argument was deprecated in Rails 6.0. Ref: #32058.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Allow using Action Mailbox on MySQL 5.5
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Active Record still support MySQL 5.5 which doesn't support datetime
with precision.
https://github.com/rails/rails/blob/9e34df00039d63b5672315419e76f06f80ef3dc4/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb#L99-L101
So we should check `supports_datetime_with_precision?` on the
connection.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
dylanahsmith/better-composed-of-single-field-query
activerecord: Use a simpler query condition for aggregates with one mapping
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
methods by default
Co-Authored-By: dylanahsmith <dylan.smith@shopify.com>
|