| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a parent association was accessed in an `after_find` or
`after_initialize` callback, it would always end up loading the
association, and then immediately overwriting the association we just
loaded. If this occurred in a way that the parent's `current_scope` was
set to eager load the child, this would result in an infinite loop and
eventually overflow the stack.
For records that are created with `.new`, we have a mechanism to
perform an action before the callbacks are run. I've introduced the same
code path for records created with `instantiate`, and updated all code
which sets inverse instances on newly loaded associations to use this
block instead.
Fixes #26320.
|
| |
|
|
|
|
| |
@column_names_with_alias, @dynamic_methods_hash, @time_zone_column_names, and @cached_time_zone
|
|
|
|
| |
This lets us avoid the constant calls to Array#<<
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master:
use the cached arel table
Fix typo in the changelog entry
Don't remove the select values to add they back again
Pluck on NullRelation accepts a list of columns
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
For now, we'll set the tables on the nodes manually.
|
| |
|
| |
|
|
|
|
|
| |
Now that we merge trees from the top down, we don't need to search
through the whole tree for particular nodes, just walk it and merge.
|
|
|
|
| |
Stop writing terrible code Aaron. This is Ruby, not Scheme
|
| |
|
|
|
|
|
|
| |
Rather than search every node in the tree, comparing that node and all
of its parents every time, start at the root from both sides and work
our way down the tree
|
| |
|
|
|
|
| |
We always want a linked list back to the root node.
|
| |
|
|
|
|
| |
The reflections hash is supposed to be private, so let's use the API.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/action_mailer_basics.md
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current code stores the klass name in active_record and this
is used throughout. While reviewing the code time and again
I had the mental picture of active_record being an instance of
a klass. However here the actual klass is being stored in
@active_record.
Secondly at two different places while referring to @active_record
the comment refers to it as base klass. All this points to
active_record being not the best variable name.
So I thought it is better to replace active_record with base_klass.
This change is confined to JoinDependency, JoinBase, JoinPart and
JoinAssociation - all joining related work.
|
| |
|
| |
|
| |
|
|
ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations
|