| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Ruby 1.8 does not support this format in Time, so the format will only
be added to the available date formats on Ruby 1.9. Changelog entry was
changed to explain that as well.
|
|
|
|
|
|
| |
It fails with Identity Map because the find call returns the same
object, so the "content" attribute that we expect to raise "missing
attribute" is actually present.
|
| |
|
|
|
|
|
| |
Backport test to ensure there won't be regressions.
The issue only happens on master at the moment.
|
| |
|
|
|
|
|
|
| |
This can be done using the class attribute cache_timestamp_format
Closes #8195
|
| |
|
|
|
|
|
|
| |
Increase numeric-timestamp precision to nanoseconds
Conflicts:
activesupport/lib/active_support/core_ext/time/conversions.rb
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When applying default_scope to a class with a where clause, using
update_column(s) could generate a query that would not properly update
the record due to the where clause from the default_scope being applied
to the update query.
class User < ActiveRecord::Base
default_scope where(active: true)
end
user = User.first
user.active = false
user.save!
user.update_column(:active, true) # => false
In this situation we want to skip the default_scope clause and just
update the record based on the primary key. With this change:
user.update_column(:active, true) # => true
Backport of #8436 fix.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/persistence.rb
activerecord/test/cases/persistence_test.rb
|
|
|
|
|
|
| |
Fix #8414. Performance problem with postgresql adapter primary_key function.
Conflicts:
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
|
|
|
|
|
|
|
|
| |
Closes #3313
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/models/developer.rb
|
|
|
|
|
|
|
|
| |
AR::Relation#pluck: improve to work with joins
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
|
| |
|
| |
|
|
|
|
| |
Fix a problem of translate_exception method in a Japanese (non English) environment.
|
|
|
|
| |
mistakenly getting utf8 collation
|
|\
| |
| | |
Fixing a schema:load when using a prefix and suffix on the tables [Reopen/backport]
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commits
978ec98c8eff824a60c7e973f369cc7bed1f4d36 and
51676652a3568ad09b06385564de4fdcb13af05e
changed database statements to use the schema_cache methods, added on
master in
c99e34e90d763c52cbe8dc3d950ed1b4db665dc4 and
dc973e78560a6514ab172f0ee86dc84a9147d39a
But apparently the methods weren't added to schema_cache, resulting in
the failure described in #8322 for 3-2-stable.
Fixes #8322.
Conflicts:
activerecord/lib/active_record/connection_adapters/schema_cache.rb
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't call will_change! for datetime nil->"".
Setting a nil datetime attribute to a blank string should not cause the
attribute to be dirty.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #8265
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/associations/association.rb
|
| |
| |
| |
| |
| |
| |
| | |
Postgresql doesn't accepts limits on text columns
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
|
| |
| |
| |
| | |
This will allow the new mysql 2.9.0 to be used, fixing our test issues.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add test to ensure preloading works as expected with "group", "select" and "includes".
Conflicts:
activerecord/test/cases/relations_test.rb
Chery-pick a739340d3c9e66814429af6f3f410c01ff86810a:
Ensure ordering to make the test pass with postgresql
Conflicts:
activerecord/test/cases/relations_test.rb
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Backport 4bc2ae0 to fix #7950
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
See issue #7950.
The previous commit fixes this bug, and is a backport of
4bc2ae0da1dd812aee759f6d13ad428354cd0e13.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13.
It fixes bug #7950.
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
activerecord/lib/active_record/relation/finder_methods.rb
|
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/test/cases/locking_test.rb
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
backport #8176, `#pluck` can be used on a relation with `select` clause.
Conflicts:
activerecord/CHANGELOG.md
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Use nil? instead of blank? to check dynamic finder result
Conflicts:
activerecord/CHANGELOG.md
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's safe to use `nil?` instead of `blank?` because it's impossible to get an array on finder with bang;
`all_by` finder matches against regex without bang: `when /^find_(all_|last_)?by_([_a-zA-Z]\w*)$/`.
Fixes #7238
|
|/ / / /
| | | |
| | | |
| | | | |
with optimistic locking enabled. Fixes #5332.
|
|/ / /
| | |
| | |
| | | |
database.yml but also DATABASE_URL.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove unwanted transaction when has one association is built
Conflicts:
activerecord/CHANGELOG.md
|
|\ \ \
| |/ /
|/| | |
|
| | | |
|
|\| | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Public method attributes_before_type_cast used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like read_attribute_before_type_cast and returns unserialised values.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
alexisbernard/3-2_find_in_batches_compatible_with_strings
Fix find_in_batches with customized primary_key on 3-2-stable
|