| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
inverse_of relation was not being set when calling find_or_initialize_by_ and the entry was
found on the db.
|
| |
|
|
|
|
|
|
|
| |
Make sure inverse_of is visible on the has_many callbacks
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/models/company.rb
|
|
|
|
|
|
|
|
| |
armstrjare/fix_query_null_foreign_key_on_new_record_collection_ids_reader""
This reverts commit 5009b078875e596a2fba7827336f7548aa6e35ac.
Also updated the CHANGELOG and adjusted the test-case to match the one on master.
|
|
|
|
|
|
|
|
|
| |
armstrjare/fix_query_null_foreign_key_on_new_record_collection_ids_reader"
This reverts commit 6675d713186c270de1c4684bc1e56742ea2e19e1, reversing
changes made to 919d1a19d5e7871d50c1531351fc3f736bad5d07.
I missed to check the target branch and wrongly merged it into 3-2-stable directly.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix the `:primary_key` option for `has_many` associations.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/associations/has_many_association.rb
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|