| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
| |
check at association reader that record is inverted and should not be reloaded because of stale was changed at target record
|
|\
| |
| | |
`Relation#count` doesn't use options anymore.
|
| |
| |
| |
| | |
`Relation#maximum`, `Relation#calculate`, `perform_calculation`, `NullRelation#calculate` as they isn't used anymore.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
jetthoughts/12415_generate_subqueries_for_relation_from_binding_params
Generate subquery for Relation passed as array condition for where
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of executing 2 queries for fetching records filtered by array condition with Relation,
added generation of subquery to current query.
This behaviour will be consistent when passes Relation as hash condition to where
Closes: #12415
|
|\ \ \
| | | |
| | | | |
Fixed MRI dependent stuff in AR tests
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Every method from MRI's core classes is written in C. This means
Method#arity always returns -1 for methods with a variable number of
arguments. This is not the case with Rubinius, where, for example
Array#slice! is implemented in Ruby and has arity -2, since is
defined as def slice!(start, length = undefined)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Related to all the other issues regarding message independent assertions
to make Rails compatible with other Ruby implementations other than MRI.
The best way here would be to have a specific error raised when modifying
frozen objects, like FrozenObjectError or something. But since Ruby
doesn't provide such a thing, we must limit the assertion to the lowest
common denominator, which is word "frozen".
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Stubbing ENV[] is not safe outside MRI. At some point after the
stubbing has occurred a backtrace is printed to the ActiveSupport
warning log: there Rubinius accesses ENV['RBX_NOCOLOR'] to determine
if it should print the backtrace with colors or not, causing the
stub to fail. Other implementations might access ENV in a different
way too, we just can't predict it.
The only thing we can do here is to actually set the ENV with what
we want and restore it afterwards.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
jetthoughts/informative_raise_message_for_incorrect_association
Make missed association exception message more informative
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Add target class name, which should have missed association on preload,
into exception message to simplify detecting problem part.
|
| |_|/
|/| | |
|
|\ \ \
| |/ /
|/| | |
Includes with persistent select, fixes #11773
|
| | |
| | |
| | |
| | | |
was overwritten.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
we don't need to walk back up the node's parents when we have the parent
on the stack
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Merge JoinDependency objects as outer joins
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Stop writing terrible code Aaron. This is Ruby, not Scheme
|
| | |
| | |
| | |
| | | |
at once
|
|\ \ \ |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
All the job can be done at class level so we can avoid some object
allocation
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
instance
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* tree: (22 commits)
remove dead code
add some convenient methods for avoiding array allocations
hide join_constraints inside the JoinDependency object
speed up match?
expose the root node and call it
just skip the join if it's already there
speed up finding existing nodes
make node search more efficient
remove == so we can see where walking up parents occurs
push parent up to the superclass
convert JoinBase to a tree and remove the Node class
names are guaranteed to be symbols
eliminate function that is only used in one place
we will always detect the same node, so just pass the node in
we do not need to to_s the name all the time
parent is guaranteed to be the same
reduce number of comparisons and array allocations
rename the variable to make more sense with a tree
walk the tree rather than generating a hash and walking it
do not convert the tree to a list just for the first node
...
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Remove the annoying `find_or_build` stuff.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The node must be a child of the parent passed in, so only search
children of the parent node
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | | |
|