| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |\
| | |
| | | |
Fix potenital infinite recursion in changed_for_autosave?
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When associations checked for autosave have a cycle, and
none of them is dirty, then changed_for_autosave? will be an
infinite loop. We now remember if we're in the check and
will short circuit the recursion.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previosly count and other AR calculations would convert
column_name_for_operation to sql on a default Arel::Table.engine
(AR::Base) connection. That could lead to trouble if current
model has a connection to a different adapter or Base connection
is inaccessible.
|
| | |
| | |
| | |
| | | |
ref #52f641264b1325a4c2bdce7971b14524bd4905f1
|
| |\ \
| | | |
| | | | |
replacing 'attribute' method with an alias
|
| | | | |
|
| | | | |
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
prathamesh-sonpatki/add-test-for-non-string-labeled-fixtures
Fix lookup of fixtures with non-string(like Fixnum) label
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Fixtures with non-string labels such as integers should be accessed
using integer label as key. For eg. pirates(1) or pirates(42).
- But this results in NotFound error because the label is converted into string before
looking up into the fixtures hash.
- After this commit, the label is converted into string only if its a
symbol.
- This issue was fount out while adding a test case for
https://github.com/rails/rails/commit/7b910917.
|
| |\ \
| | | |
| | | | |
Propagate bind_values from join in subquery
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`initialize_internals_callback` will attempt to assign attributes from
the current scope, which will fail if something defined the method
and calls super (meaning it won't hit `method_missing`).
Fixes #18339
|
| | | | |
|
| |\ \ \
| | |/ /
| |/| | |
Fix rollback of primarykey-less tables
|
| | | |
| | | |
| | | | |
If you have a table without a primary key, and an `after_commit` callback on that table (ie `has_transactional_callbacks?` returns true), then trying to rollback a transaction involving that record would result in “ActiveModel::MissingAttributeError: can't write unknown attribute ``”
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Clean up secure_token_test
|
| | | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ruby 4.2 started doing `value.gsub('$LABEL', label)` for fixture label interpolation, but you can have have valid YAML where `label` isn't a String.
For example:
```YAML
0:
name: John
email: johndoe@gmail.com
1:
name: Jane
email: janedoe@gmail.com
```
This YAML will create a label that is a Fixnum, causing `TypeError: no implicit conversion of Fixnum into String.`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Addresses https://github.com/rails/rails/commit/ed56e596a0467390011bc9d56d462539776adac1#commitcomment-9145960
|
| | | |
| | | |
| | | |
| | | | |
addresses https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3#commitcomment-9144563
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
This adresses https://github.com/rails/rails/commit/1b7aa62b184c4410c99208f71b59bbac5c5f03be#commitcomment-9147803
|
| | |/
| |/| |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The hack so skip a Thread test for Ruby 1.9 can be removed now that
Rails requires Ruby >= 2.0.
Conflicts:
activerecord/test/cases/transactions_test.rb
|
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/lib/active_record/attribute_methods/read.rb
|
| |\ \
| | | |
| | | | |
Add has_secure_token to Active Record
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update SecureToken Docs
Add Changelog entry for has_secure_token [ci skip]
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | | |
Tests should still pass after removing `require 'active_support/deprecation'`
from these files since the related deprecations have been removed.
|
| | |
| | |
| | |
| | | |
These requires were added only to change deprecation message
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this change we had a small set of "truthy", and all others
are "falsy".
Now, we have a small set of "falsy" values and all others are
"truthy" matching Ruby's semantics.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before this change any error raised inside a transaction callback
are rescued and printed in the logs.
Now these errors are not rescue anymore and just bubble up,
as the other callbacks.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Now all strings will be handled as a URL.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit ae96f229f6501d8635811d6b22d75d43cdb880a4.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods.rb
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
`ActiveModel::Dirty#reset_changes`.
|
| |/
| |
| |
| | |
`silence_stderr`, `silence_stream`, `capture` and `quietly`.
|
| |\
| | |
| | | |
`sql_type` has been determined already when quoting defaults
|