| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current behaviour of checking if there is a LEFT OUTER JOIN arel
node to detect if we are doing eager_loading is wrong. This problem
wasn't frequent before as only some pretty specific cases would add
a LEFT OUTER JOIN arel node. However, the recent new feature
left_outer_joins also add this node and made this problem happen
frequently.
Since in the perform_calculation function, we don't have access to
eager_loading information, I had to extract the logic for the distinct
out to the calculate method.
As I was in the file for left_outer_join tests, I fixed a few that had
bugs and I replaced some that were really weak with something that
will catch more issues.
In relation tests, the first test I changed would have failed if it
had validated the hash returned by count instead of just checking how
many pairs were in it. This is because this merge of join currently
transforms the join node into an outer join node, which then made
count do a distinct. So before this change, the return was
{1=>1, 4=>1, 5=>1}.
|
|\
| |
| |
| |
| | |
malclocke/specify_ar_message_interpolation_names_in_i18n_guide
List names of error interpolation variables.
|
| | |
|
|\ \
| | |
| | | |
Clarify migration to ApplicationRecord in upgrade guides [ci skip]
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add array column documentation
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Show unpermitted parameters as symbols in logs (so they could be copy…
|
| | | |
| | | |
| | | |
| | | | |
to the code)
|
|\ \ \ \
| | | | |
| | | | |
| | | | | |
Make association queries to preparable: Step 1
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently association queries cannot be preparable.
```ruby
Post.where(author_id: 1).to_a
# => SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = ? [["author_id", 1]]
Post.where(author: 1).to_a
# => SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1
```
To make association queries to preparable, it should be handled in
`create_binds_for_hash`. This change is a first step for it.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
`where` by `array|range` attribute with array or range value
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Currently predicate builder cannot build a predicate for `array|range`
attribute. This commit fixes the issue.
Related #25671.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
When calling association.find RecordNotFound is now raised with the s…
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
argument as when we do it in Record.find (primary_key, id and model).
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Avoid to allow unused splat args for `t.timestamps` in `create_table`
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Unfortunately `t.timestamps` in `create_table` allows unused splat args.
But the same one in `change_table` does not allow them.
This commit fixes the inconsistent behavior.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Refactor `quoted_columns_for_index` by extracted `add_options_for_index_columns`
|
| |/ / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
fix Rails.application.routes.router.visualizer for router debugging
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
fixes error due to Routes#partitioned_routes being removed
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
`CollectionProxy#take` should respect dirty target
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`#first`, `#second`, ..., `#last` methods respects dirty target. But
`#take` doesn't respect it. This commit fixes the inconsistent behavior.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Support multiple indexes on the same column when loading the schema
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
y-yagi/remove_test_mailers_when_skipping_action-mailer
remove "test/mailers" directory when skipping action-mailer
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
Related to #26146
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Drop a temporary table before end of a test case
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix ActionController::Live deadlock
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
after writing to the stream.
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
Eager autoload ActiveRecord::TableMetadata
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fixes a bug that can occur when ActiveJob tries to access ActiveRecord.
Specifically, I had an Active Job process fail on Sidekiq with this error:
```
ActiveJob::DeserializationError: Error while trying to deserialize arguments:
uninitialized constant ActiveRecord::Core::ClassMethods::TableMetadata
Did you mean? ActiveRecord::TableMetadata
```
raised by these lines of code:
```
[GEM_ROOT]/gems/activerecord-5.0.0.1/lib/active_record/core.rb:300 :in `table_metadata`
298
299 def table_metadata # :nodoc:
300 TableMetadata.new(self, arel_table)
301 end
302 end
[GEM_ROOT]/gems/activerecord-5.0.0.1/lib/active_record/core.rb:273 :in `predicate_builder`
[GEM_ROOT]/gems/activerecord-5.0.0.1/lib/active_record/core.rb:290 :in `relation`
```
The problem seems to be that, inside ActiveRecord::Core, the `TableMetadata`
class has not been loaded and, therefore, Rails tries to access the constant
`ActiveRecord::Core::ClassMethods::TableMetadata` which does not exist.
Eager loading `ActiveRecord::TableMetadata` should fix the issue.
@rafaelfranca -- see our Campfire discussion
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Clarify use of update task on 4.2 and earlier [ci skip]
|
| | |_|_|_|_|_|/ /
| |/| | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Remove `find_nth_with_limit_and_offset` private method
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
`find_nth` is protected method, therefore `offset` has not been passed
anywhere. `find_nth_with_limit_and_offset` is unnecessary anymore
because `offset` has not been passed.
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Remove odd ivar from ActiveRecord::LogSubscriber
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This was used to switch the output colour between log lines, but now the
output colour is based on the type of statement being logged instead.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
AC::Metal is already defining default encoding as UTF 8, let's reuse it.
|
| | |_|_|/ / / / / /
| |/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
remove useless parameter
|
| | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / / / /
|/| | | | | | | | | | |
fix usage of pluralized word [ci skip]
|
|/ / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Fix `ActiveRecord::FixtureSet` docs [ci skip]
|
|/ / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
`ActiveSupport::TestCase` was replaced `ActiveRecord::TestCase` in #26150.
But this docs is for rails apps per se, it should be `ActiveSupport::TestCase`.
See https://github.com/rails/rails/pull/26150#discussion_r74710989.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Reason: See https://github.com/rails/rails/pull/26163#issuecomment-239703322
This reverts commit 39effc857e5c774670d6fad1a26aebcc33c51f0a.
|
|\ \ \ \ \ \ \ \ \ \
| |_|_|/ / / / / / /
|/| | | | | | | | | |
Consolidate `ActiveRecord::TestCase` and `ActiveSupport::TestCase` in AR test cases
|