| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Make AM::Dirty less dirty to plugin into AR or other library
|
|\
| |
| |
| |
| |
| |
| | |
Dump UUID default functions to schema.rb [2nd version]. Fixes #10751.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed a bug in when using has_many association with :inverse_of option and UUID primary key.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | | |
UUID primary key.
|
|\ \ \
| | | |
| | | | |
Fix typo. This test isn't executed even in the postgresql.
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
This will make easier to hook protected_attributes gem in our code
without making that gem fragile to change in Rails code base.
Closes #12243
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
or even be numbers, so sorting by id doesn't make sense. Please use `sort_by`
and specify the attribute you wish to sort with. For example, change:
Post.all.to_a.sort
to:
Post.all.to_a.sort_by(&:id)
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Collapse where constraints to the Arel::Nodes::And node
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order to remove duplication with joining arel where constraints with
`AND`, all constraints on `build_arel` are collapsed into one head node: `Arel::Nodes::And`
Closes: #11963
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Deprecate the delegation of Array bang methods in ActiveRecord::Delegation
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/cases/relation_test.rb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The primary means of returning results for Array bang methods is to modify
the array in-place. When you call these methods on a relation, that
array is created, modified, and then thrown away. Only the secondary
return value is exposed to the caller.
Removing this delegation is a straight-forward way to reduce user error
by forcing callers to first explicitly call #to_a in order to expose
the array to be acted on by the bang method.
|
| | | | |
| | | | |
| | | | |
| | | | | |
cases/relation/mutation_test.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Make CollectionAssociation first/last with integer fetch with query
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When first or last is called with an integer on an unloaded association,
the entire collection is loaded. This differs surprisingly from the
behavior of Relation#first/last, which translate the call into a limit
query. For large collections this can make a big difference in
performance.
Change CollectionAssociation#fetch_first_or_last_using_find? to make
this kind of call delegate to Relation.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Let the SQLite rake tasks run without rails
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Allow Relation#from to accept other relations with bind values.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
sense. Let's load the object to ensure it's an array and count the
array.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
At the point we want to add the reflection we already know the
reflection is of the AggregateReflection type so we can call a specific
method
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Oops, I should had run the tests
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When the adapter is with prepared statement disabled and the binds array
is not empty the connection adapter will try to set the binds values and
will fail. Now we are checking if the adapter has the prepared statement
disabled.
Fixes #12023
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Perf: avoid dupes add fallback logic for coders
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Avoid empty transaction from setting has_one association on new record.
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Reduce allocations when extracting AR models
|
| | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Relation#merge should not lose readonly(false) flag.
|
| |/ / / / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The original code ignores the `false` value because `false.blank? # => true`.
|
| |/ / / / / / / / /
|/| | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
change def self.primary_key to self.primary_key
change def self.primary_key to self.primary_key
|