| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
|
| |
|
|\
| |
| |
| |
| | |
tomkadwill/activerecord_associations_options_param
[ci skip] Changed options to +options+ for rdoc
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
`#create!` regarding validations in contrast to the behavior of
`#create`. Also describe creating multiple objects using an array of
hashes as the +attributes+ parameter. [ci skip] /cc #16384
|
|\
| |
| | |
[ci skip] Added +object+ and +attributes+ to create! description for rdoc
|
| |
| |
| |
| | |
for rdoc
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When Rails starts, tables existence check query is executed
number of models.
In case of mysql,
SHOW TABLES LIKE 'table1';
SHOW TABLES LIKE 'table2';
SHOW TABLES LIKE 'table3';
...
SHOW TABLES LIKE 'table999';
Add process to get the names of all tables by one query.
|
|/
|
|
|
|
|
|
|
| |
Currently when we call id_was and we have a custom primary key name
Active Record will return the current value of the primary key. This
make impossible to correctly do an update operation if you change the
id.
Fixes #16413
|
|
|
|
|
|
|
|
|
|
| |
The rake tasks and the `DatabaseTakss` adapter classes used to
assume a configuration at some places. This forced the rake
tasks to establish a specific connection before calling into
`load_schema`.
After #15394 this started to cause issues because it could
`purge` the wrong database before loading the schema.
|
|
|
|
|
|
| |
morgoth/fix-automatic-maintaining-test-schema-for-sql-format""
This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
|
|\
| |
| | |
Clarify Transaction responsibilities by breaking unneeded inheritance hierarchy.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Transaction class doesnt need to encapsulate the transaction state using
inheritance.
This removes all Transaction subclasses, and let the Transaction object
controls different actions based on its own state. Basically the only
actions would behave differently are `being`,`commit`,`rollback` as they
could act in a savepoint or in a real transaction.
|
|\ \
| | |
| | |
| | | |
Moved #create! method from Validations to Persistence module
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
The method has been removed in 09206716f8695f6b8467f15c1befa5a4c3c10978
(PR #16074), but the delegation was apparently missed, and one instance
of the method was added back with the addition of OID::Xml in
336be2bdf7dfa1b31879d0ab27e5f3101b351923 (PR #16072), so we can safely
rm both.
|
| |
| |
| |
| |
| |
| | |
We shouldn't be delegating chain to ThroughAssociation since the
only place that needs to call it is `target_scope`. Instead we
can call `reflecion.chain`.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
joker1007/fix_decimal_cast_from_float_with_large_precision
Fix type casting to Decimal from Float with large precision
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | | |
When I defines large precision column at RDBMS,
I assigns float value, raise ArgumentError (precision too large).
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
JackDanger/doc-fix-in-join-association-build_constraint
[doc] updating documented parameter for build_constraint
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Updates documentation in line with changes made in
743b67508e2027e1d086142ccbec47a19fc943f6
|
|\ \ \ \
| | | | |
| | | | | |
Fixes small error in ActiveRecord::Reflection docs
|
| |/ / /
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| | | | |
| | | | | |
rename MiniTest to Minitest
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`source_macro` is no longer used in any ActiveRecord code. I've
chosen to deprecate it because it was not marked as nodoc and may
be in use outside of rails source.
|
| | | | | |
|
| |_|_|/
|/| | |
| | | |
| | | | |
Ruby generally does not use the is_* prefix on predicate methods.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Transactions refactoring - 2
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add ActiveRecord::Tasks::DatabaseTasks.migrate
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
This extracts the logic that was embedded in a Rake task into a static
method.
Bonus: the first test for `rake db:migrate`
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[doc] Clarify how the ConnectionHandler works
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes the implicit description of how connection pooling works a
little more explicit. It converts the examples of a model hierarchy into
actual Ruby code and demonstrates how the key structure of the
database.yml relates to the `establish_connection` method.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pushing conditionals down to through reflection
Only the through association needs the part of this conditional
that deals with belongs to and polymorphic? so that can be pushed
down into the ThroughReflection reducing the conditionals.
Remove conditional because we can delegate join keys to source reflection
Remove need for source_macro checking
By adding join_id_for to the other reflections we remove the need
to cehck against the source_macro and can reduce the conditioanl
from the original join_id_for(owner)
Using polymorphism instead of testing the source_macro
This case statement in join_association is almost exactly the same
as the original join_keys code. Testing taht theory by creating a
new join_dependency_keys(assoc_klass) method.
Refactor join_keys further to be more concise
Fixed format of "#:nodoc:" to "# :nodoc:" where I added them to this
file.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that we define the macro on the reflection type we no longer
need to check `macro == :what` on each type for `belongs_to?` or
`has_one?` etc. These now default to false unless it's defined
in the reflection class.
Reuse existing belongs_to? method to check macros
We don't need to do `:belongs_to == macro` anymore becasue we
have a `belongs_to?` method. I didn't find this being used
anywhere for `has_one?` or `collection?` since they were already
fixed.
|
|/ /
| |
| |
| | |
These are the only instances of this in the whole code base.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This piece of code was introduced on
67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Added documentation for change_table
|