| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This reverts commit 1166d49f62ccab789be208112163ad13183224e2.
Conflicts:
activerecord/test/cases/associations/eager_test.rb
|
|
|
|
|
|
|
|
| |
Causes a subtle regression where record.reload includes the default
scope. Hard to reproduce in isolation. Seems like the relation is
getting infected by some previous usage.
This reverts commit dffbb521a0d00c8673a3ad6e0e8ff526f32daf4e.
|
|
|
|
|
|
| |
Conflicts:
activerecord/test/cases/associations/eager_test.rb
|
| |
|
|
|
|
| |
builder
|
|
|
|
|
|
| |
would get ConnectionNotEstablished error because it always tried to use
ActiveRecord::Base's connection, even though it should be using the connection
of the model whose context we're operating in
|
|
|
|
| |
Don't instantiate two objects in collection proxy / find_or_instantiate_by
|
|
|
|
| |
ids_reader method fixed, test added to has_many association (for PostgreSQL)
|
|
|
|
|
|
| |
strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
| |
when fetching ids for a collection, bypass preloading
to avoid the unnecessary performance overhead
|
|
|
|
| |
object. Fixes a regression from 3.0.x
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
association methods are now generated in modules
|
| |
| |
| |
| |
| |
| |
| | |
This change uses Module.redefine_method as defined in ActiveSupport.
Making Module.define_method public would be as clean in the code, and
would also emit warnings when redefining an association. That is pretty
messy given current tests, so I'm leaving it for someone else to decide
what approach is better.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of generating association methods directly in the model
class, they are generated in an anonymous module which
is then included in the model class. There is one such module
for each association. The only subtlety is that the
generated_attributes_methods module (from ActiveModel) must
be forced to be included before association methods are created
so that attribute methods will not shadow association methods.
|
| |
| |
| |
| | |
present but the record is unsaved
|
|/
|
|
|
|
|
| |
If we're deleting all records in an association, don't add a IN(..)
clause to the query.
Fixes #3672.
|
| |
|
|
|
|
| |
Preserve SELECT columns on the COUNT for finder_sql when possible
|
| |
|
|
|
|
|
|
|
|
|
| |
If a record is removed from a has_many :through, all of the join records
relating to that record should also be removed from the through
association's target.
(Previously the records were removed in the database, but only one was
removed from the in-memory target array.)
|
|
|
|
| |
Fixes #3425.
|
|
|
|
|
| |
Fixes creating records in a through association with a polymorphic source
type.
|
|
|
|
| |
Fix: habtm doesn't respect select query method
|
|
|
|
| |
Closes #3104.
|
|
|
|
| |
mutating the array. Fixes #3020.
|
|
|
|
| |
association scope.
|
|
|
|
| |
model should not be included in the association scope. (We're already excluding includes.) Fixes #2834.
|
| |
|
|
|
|
| |
therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556.
|
|
|
|
| |
loaded. Fixes #2054.
|
|
|
|
| |
Module#delegate previously ignored method visibility.
|
|
|
|
| |
for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
|
|
|
|
| |
by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
|
|
|
|
|
|
| |
English to
American English(according to Weber)
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
issue #402.
|
| |
| |
| |
| | |
record.create_association. Fixes #1960.
|
|\ \
| | |
| | | |
collection_singular_ids ignores association :include option
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
conditions and includes,
when condtions references tables from includes.
Test fail because of invalid sql:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: comments.id:
SELECT "posts".id FROM "posts" INNER JOIN "readers" ON "posts"."id" = "readers"."post_id"
WHERE "readers"."person_id" = 1 AND (comments.id is null)
Bug described in github#925
This commit will revert fix from https://github.com/rails/rails/commit/3436fdfc12d58925e3d981e0afa61084ea34736c , but tests is ok.
Bug described in #6569 ticket.
|
|/ /
| |
| |
| | |
performance gain for cases where the association is never used to load the target, for example with preloading. Related: #1873.
|
|\ \
| |/
|/| |
Fixed CollectionAssociation#find to be compatible with Array#find
|
| |
| |
| |
| |
| | |
In order to make CollectionAssociation behave closer to Array
Add the ability to pass block to #find method just like Array#find does.
|
|/ |
|