| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | |
| | | |
| | | | |
hdabrows/drop-correct-index-when-reverting-migration
Drop the correct index after reverting a migration
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously when reverting a migration which added a named index it
would instead drop a corresponding index with matching columns but
without a name.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
remove created state after test execution, not before the next test.
This prevents the leak of the `ex` table outside of a single test.
|
|/ / /
| | |
| | |
| | | |
This should make it harder to accidentally break this test.
|
| | | |
|
| | |
| | |
| | |
| | | |
check it is handles empty statement
|
|\ \ \
| | | |
| | | | |
Reaper has access to threadsafe active? call
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
context in validation goes through has many relationship
|
| | | | | |
|
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It should not save the parent record when the nested attributes are
invalid.
Test case to cover #8194.
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
If the test is run in a timezone that is behind UTC it fails because
the time generated is ahead of 0000-01-01 00:00:00. Just increase the
time subtracted so that timezone has no effect.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fixed typos in column_definition_test.rb.
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | | |
This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510)
but the docs were still out of date.
|
|\ \ \
| | | |
| | | | |
Make sure transaction state resets after commit
|
| | | |
| | | |
| | | |
| | | | |
[fixes #12566]
|
|\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
Fortisque/kevin/active_record_HABTM_with_belongs_to
destruction errors out on HABTM w/out primary key
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
PostgreSQL implementation of SchemaStatements#index_name_exists?
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
|
| |/ / /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | | |
Associations now raises `ArgumentError` on name conflicts. Closes #13217.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Dangerous association names conflicts include instance or class
methods already defined by `ActiveRecord::Base`.
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Let `unscope` ignore non Arel scope.where_values
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix regression on .select method
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was a common pattern:
```
query = author.posts.select(:title)
connection.select_one(query)
```
However `.select` returns a ActiveRecord::AssociationRelation, which has
the bind information, so we can use that to get the right sql query.
Also fix select_rows on postgress and sqlite3 that were not using the binds
[fixes #7538]
[fixes #12017]
[related #13731]
[related #12056]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This behavior is only work out-of-box with minitest and also add a
downside to run after each test case, even if we don't used the travel
or travel_to methods
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
find_in_batches should not mutate its argument
|
| | | | | |
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | | |
after loading it from YAML - fixes #13861
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`find_in_batches` now returns an `Enumerator`
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/batches.rb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
so that it
can be chained with other `Enumerable` methods.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Dangerous name conflicts includes instance or class method conflicts
with methods defined within `ActiveRecord::Base` but not its ancestors,
as well as conflicts with methods generated by other enums on the same
class.
Fixes #13389.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Similar to dangerous attribute methods, a scope name conflict is
dangerous if it conflicts with an existing class method defined within
`ActiveRecord::Base` but not its ancestors.
See also #13389.
*Godfrey Chan*, *Philippe Creux*
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Before:
>> ActiveRecord::Base.respond_to?(:find_by_something)
NoMethodError: undefined method `abstract_class?' for Object:Class
After:
>> ActiveRecord::Base.respond_to?(:find_by_something)
=> false
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- fixes #13788
As per the documentation at lock!, if the :lock option is a string it should use the given SQL to generate the lock statement.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
With this we can write `Model#select(:aliased)`, `Model#order(:aliased)`,
`Model#reoder(aliased: :desc)`, etc.
Supplementary work to 54122067acaad39b277a5363c6d11d6804c7bf6b.
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix `ActiveRecord::RecordNotFound` error message with custom primary key
|