| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #15821.
|
|\
| |
| | |
Add option to stop swallowing errors on callbacks.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, Active Record will rescue any errors raised within
after_rollback/after_create callbacks and print them to the
logs. Next versions of rails will not rescue those errors anymore,
and just bubble them up, as the other callbacks.
This adds a opt-in flag to enable that behaviour, of not rescuing
the errors.
Example:
# For not swallow errors in after_commit/after_rollback
config.active_record.errors_in_transactional_callbacks = true
[fixes #13460]
|
|/
|
|
|
|
|
|
|
|
|
| |
If the request parameters are passed to create_with and where they can
be used to do mass assignment when used in combination with
Relation#create.
Fixes CVE-2014-3514
Conflicts:
activerecord/lib/active_record/relation/query_methods.rb
|
|\
| |
| |
| |
| | |
byroot/add-test-case-for-nested-array-in-where-conditions
Add a test case of nested empty array values in conditions
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Post.where(id: [[]]).to_a
Used to fail with a SQL syntax error (until 4.1):
SELECT ... WHERE id in ();
It now properly generate:
SELECT ... WHERE 1=0;
|
|\ \
| | |
| | | |
Change the default `null` value for timestamps
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per discussion, this changes the model generators to specify
`null: false` for timestamp columns. A warning is now emitted if
`timestamps` is called without a `null` option specified, so we can
safely change the behavior when no option is specified in Rails 5.
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Fixed issue w/custom accessors + reserved name + inheritance
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed an issue where custom accessor methods (such as those generated by
`enum`) with the same name as a global method are incorrectly overridden
when subclassing.
This was partially fixed in 4155431 then broken again by e5f15a8.
Fixes #16288.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Implement `==` on `Type::Value` and `Attribute`
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This was a small self contained piece of the refactoring that I am
working on, which required these objects to be comparable.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
after_commit should not run in nested transactions, however they should
run once the outermost transaction gets committed. This patch fixes the
problem copying the records from the Savepoint to its parent. So the
RealTransaction will have all records that needs to run callbacks on it.
[fixes #16425]
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
Use `commit_transaction`/`rollback_transaction` on
`within_new_transaction` method, so they make sure they `pop` the
transaction from the stack before calling the methods `commit`/`rollback`.
|
| | | |
|
| | |
| | |
| | |
| | | |
Follow up to the discussion on #16505.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Looks like #first wasn't warm enough...
|
|\ \ \
| | | |
| | | | |
[Regression 4.0 -> 4.1] Fixed AR::Relation#where edge case with Hash and other Relation
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Example:
Author.where(posts: { author_id: Author.where(country_id: 1) }).joins(:posts)
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
greyblake/dont_write_timestamps_if_they_are_not_attributes
Write timestamps only if there are timestamps columns
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Or some tests fail when run in random order
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
[ci skip] fix spelling of overridden
|
| | |_|_|/
| |/| | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
[Yves Senn & Matthew Draper]
The column check was embodied in the defaul index name.
If the :name option was used, the specified columns were not verified at all.
Given:
```
assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma)
```
That index could have been defined on any field, not necessarily on `:foo_id`.
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |_|/
|/| | |
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.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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).
|
|\ \ \ \
| |_|/ /
|/| | | |
rename MiniTest to Minitest
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Transactions refactoring - 2
|
| | |/ /
| |/| | |
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
This extracts the logic that was embedded in a Rake task into a static
method.
Bonus: the first test for `rake db:migrate`
|
|\ \ \
| | | |
| | | |
| | | | |
Transactions refactoring
|
| | | |
| | | |
| | | |
| | | | |
Also add test to assets the savepoint name
|
| |/ /
|/| | |
|
|/ /
| |
| |
| | |
[Philippe Creux, Chris Teague]
|