| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 88a296dccc401da143d90cad54b693ff06bf2b58, reversing
changes made to 666a7e34f553cef4c8878362eafc79c7e3f310c3.
Conflicts:
activerecord/CHANGELOG.md
Reason: this has been resulting in some hard to track bugs and is
introducing a possible breackage in a stable version.
|
|
|
|
|
|
|
|
|
| |
Closes #8265
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/associations/association.rb
|
|
|
|
|
|
|
| |
See issue #7950.
The previous commit fixes this bug, and is a backport of
4bc2ae0da1dd812aee759f6d13ad428354cd0e13.
|
|
|
|
| |
Count returns 0 without querying if parent is not saved
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0693e079708a52b777f2b7872b8e3d467b880a0d.
Revert "Cache columns metadata to avoid extra while testing"
This reverts commit a82f1e3f5d11c8dfba9f4c911745ec40a7965216.
Reason: This is causing failures in the postgresql build.
See http://travis-ci.org/#!/rails/rails/builds/2485584
Related with #7675
|
| |
|
|
|
|
|
|
| |
kennyj/fix_9fa3f102813eeeec440abd75870dfa7b23835665
Fix warning: method redefine. Testcase name are duplicated.
|
|
|
|
|
|
|
|
|
| |
Don't preserve SELECT columns on COUNT
Closes #7651
Conflicts:
activerecord/test/cases/associations/has_many_associations_test.rb
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a79bfa92e7bdc31b346d13ee5447d3fdac382bfb.
Conflicts:
activerecord/CHANGELOG.md
We shouldn't introducing deprecations in point releases.
It will be deprecated in 4.0 instead.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b98d1e21635d8776de8893cc09bd86c71f6c78f0.
Closes #6609
Conflicts:
activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
|
|
|
|
|
|
|
|
| |
The fix commited in e2a070c was returning the `new_target`, as
a try to return whatever user replaced association with. The
problem is, the resulting association target may be ordered
differently. In such case we want to return the target that
will be later used for that association.
|
|
|
|
|
|
|
|
| |
Bug #6289
Conflicts:
activerecord/test/cases/associations/has_many_associations_test.rb
|
|
|
|
|
|
| |
Conflicts:
activerecord/test/cases/associations/has_many_associations_test.rb
|
|
|
|
|
|
|
| |
Also skip persistente tests related to UPDATE + ORDER BY for postgresql
PostgreSQL does not support updates with order by, and these tests are
failing randomly depending on the fixture loading order now.
|
|
|
|
| |
builder
|
|
|
|
| |
Don't instantiate two objects in collection proxy / find_or_instantiate_by
|
| |
|
|
|
|
| |
ids_reader method fixed, test added to has_many association (for PostgreSQL)
|
|
|
|
| |
allow reorder to affect eager loading correctly
|
|
|
|
| |
present but the record is unsaved
|
|
|
|
| |
Preserve SELECT columns on the COUNT for finder_sql when possible
|
| |
|
|
|
|
| |
Fix: habtm doesn't respect select query method
|
|
|
|
| |
mutating the array. Fixes #3020.
|
|
|
|
| |
HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be.
|
|
|
|
|
| |
In order to make CollectionAssociation behave closer to Array
Add the ability to pass block to #find method just like Array#find does.
|
|
|
|
| |
before_initialize callback of the record runs. Fixes #1842.
|
|
|
|
| |
not a single line of SQL should be sent to the database, not even stuff that is ignored by assert_queries. The argument being that if you write assert_no_queries, you really do not want there to be any queries.
|
| |
|
|
|
|
| |
are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database.
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
|
|
|
| |
issue where the collection proxies were not consistent
|
| |
|
|
|
|
| |
an abstract superclass. Fixes #552.
|
|
|
|
|
|
|
| |
The build_association method was added as an API for plugins
to hook into in 1398db0. This commit restores this API and the
ability to override class.new to return a subclass based on
a virtual attribute in the attributes hash.
|
|
|
|
| |
attributes when copying, rather than using the assignment method
|
|
|
|
| |
be assigned without mass-assignment protection when a record is built on the association.
|
|
|
|
| |
scoped.scope_for_create. Fixes #481.
|
| |
|
| |
|
|
|
|
|
|
|
| |
- adds tests for find_or_create_by and find_or_initialize_by on has_many associations
- changes the behavior of ActiveRecord::Associations::CollectionProxy#method_missing to differ to
ActiveRecord::FinderMethods#find_or_instantiator_by_attributes for arg processing and saving so
find_or_create_by's api on associations will be consistent w/ the api for model classes.
|
|
|
|
| |
favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
... } rather than instance_eval-ing strings
|
|
|
|
| |
state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
|
|
|
|
| |
should return self.
|