| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
This reverts commit a03097759bd7103bb9db253e7ba095f011453f75.
This needs more work before it would work correctly on master.
|
|
|
|
|
|
|
|
| |
Fixed issue with ActiveRecord serialize object as JSON
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods/serialization.rb
|
|\
| |
| | |
If our connection is explicitly non-strict, tell MySQL
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We default to making the connection strict, but have historically relied
on the MySQL default when we want it to be non-strict. On some (recent?)
versions of MySQL, new connections default to being strict, so if we've
been told 'strict:false', we're obliged to pass that on.
This fixes a test failure that we've seen turn up on relatively-new
development machines, so we do already have a test covering it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One of the author fixture we have ("david") references an author address by ID.
Since we disable FK checks when inserting fixtures, this is all fine until we
try to update it, at which point MySQL would complain about the missing row
referenced by the `author_address_id`.
[Godfrey Chan, Matthew Draper]
|
| |
| |
| |
| | |
This reverts commit e84799d, e31104c and e6ca8e2
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In addition to defining the association, a `required` association will
also have its presence validated.
Before:
```ruby
belongs_to :account
validates_presence_of :account
```
After:
```ruby
belongs_to :account, required: true
```
This helps to draw a distinction between types of validations, since
validations on associations are generally for data integrity purposes,
and aren't usually set through form inputs.
|
|/ |
|
| |
|
|\
| |
| | |
Use a type object for type casting behavior on SQLite3
|
| |
| |
| |
| |
| | |
Note: I'm not sure we actually need to be logging when this happens.
This code would be a fair bit cleaner if we didn't need to log it.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
cade/fix_counter_cache_count_with_association_selects
Add `:all` argument to `count` in `reset_counters`
Conflicts:
activerecord/CHANGELOG.md
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Prior to this fix, if an association had a scope with a `select`,
calls to `reset_counters` would generate invalid SQL and throw:
ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of
arguments to function COUNT()
References #10710, #13648
|
|\ \ \
| | | |
| | | | |
After find-via-reload, the record is not new
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Remove unneccessary special case for money in quoting
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Do not rely on the column type when quoting infinity
|
| |/ / / |
|
|/ / / |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Move pk initialization logic onto `AttributeSet`
Conflicts:
activerecord/lib/active_record/attribute_set.rb
|
| | |
| | |
| | |
| | | |
Better encapsulates its internals from `ActiveRecord::Base`.
|
| | |
| | |
| | |
| | |
| | | |
The test case for CVE-2014-3483 doesn't actually send the generated SQL
to the database. The generated SQL is actually invalid for real inputs.
|
| | |
| | |
| | |
| | | |
Fix CVE-2014-3483 and protect against CVE-2014-3482.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
morgoth/fix-automatic-maintaining-test-schema-for-sql-format"
This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing
changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586.
Conflicts:
activerecord/CHANGELOG.md
|
| | |
|
| | |
|
|/
|
|
|
|
| |
This adds the regressions tests from issue #15893 to
master. It's checking that both strings and symbols are
accepted as keys for nested associations.
|
|
|
|
|
| |
We already had one in the public API that people can use more easily for
the transition
|
| |
|
|
|
| |
Documenting a potential source of confusion about how STI classes handle changes.
|
|\
| |
| | |
Simplify creation of default attributes on AR instance
|
| |
| |
| |
| | |
`AttributeSet#dup` has all the behavior we need.
|
|\ \
| | |
| | | |
Remove array workaround in PG quoting
|
| | |
| | |
| | |
| | |
| | | |
We no longer need to do fancy legwork to make sure arrays use a type
object, now that schema methods use a real type object.
|
|/ /
| |
| |
| |
| | |
Hstore no longer needs additional quoting to be used in an array, the
array type handles it sufficiently.
|
|\ \
| | |
| | | |
Use the type object when sending point columns to the DB
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Don't encourage usage of `columns_hash`
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
As discussed in https://github.com/plataformatec/simple_form/pull/1094,
we should not encourage usage of `columns_hash`, and instead provide an
alternate method to determine whether or not an attribute exists.
The language `attribute` was chosen over `column` since these are in the
`AttributeMethods` module.
|
|\ \
| | |
| | | |
Use `Hash#transform_values` to clean up `AttributeSet`
|
| |/ |
|
|/ |
|
|
|
|
|
|
|
|
| |
The only case where we got a column that was not `nil`, but did not
respond to `cast_type` was when type casting the default value during
schema creation. We can look up the cast type, and add that object to
the column definition. Will allow us to consistently rely on the type
objects for type casting in all directions.
|
| |
|