| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
can't see a way that it would happen ever)
|
|
|
|
| |
association conditions on singular associations. Fixes #481 (again).
|
| |
|
| |
|
|
|
|
| |
Fixes #508.
|
| |
|
| |
|
|
|
|
| |
scoped.scope_for_create. Fixes #481.
|
| |
|
|
|
|
|
| |
Wrapping each Record.associations.build in a transaction is going to
make several unneeded queries. Reverting this commit also fixes #479.
|
|\
| |
| | |
Add association join conditions to JOIN clause, not WHERE
|
| | |
|
|\ \
| |/
|/| |
Fix for lighthouse #6741
|
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
|/
|
|
| |
security options (:as and :without_protection) in build, create and create! methods.
|
|
|
|
| |
method to make it easy to change/override (requested by Ernie Miller so that MetaWhere can add to it easily)
|
|
|
|
|
|
| |
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now.
It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
|
|
|
|
| |
query is already cached by the query cacher. For formalised proof see http://www.youtube.com/watch?v=wDefXLb-FDs
|
|
|
|
| |
suggestion!
|
|
|
|
| |
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
|
| |
|
|
|
|
| |
The old method of redefining destroy meant that clearing the HABTM join table would happen as long as the call to destroy succeeded. Which meant if there was a before_destroy that stopped the instance being destroyed using normal means (returning false, raising ActiveRecord::Rollback) rather than exceptional means the join table would be cleared even though the instance wasn't destroyed. Doing it in an after_destroy hook avoids this and has the advantage of happening inside the DB transaction too.
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
| |
| |
| | |
not in ON constraints because postgres requires that the table has been joined before the condition references it.
|
| | |
|
| |
| |
| |
| | |
JoinDependency::JoinAssociation into a JoinHelper module
|
| | |
|
| |
| |
| |
| | |
Reflection#chain and Reflection#options as they now no longer relate solely to through associations.
|
| |
| |
| |
| | |
AssociationScope class which is capable of building a scope for any association.
|
| |
| |
| |
| | |
test_has_many_association_through_a_has_many_association_with_nonstandard_primary_keys
|
| |
| |
| |
| | |
construct_owner_conditions.
|
| |
| |
| |
| | |
order that they should be joined together.
|
|\|
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
|
| | |
|
| |
| |
| |
| | |
instantiate one AR object per actual record in the database. (Even when IM is off.)
|
| |
| |
| |
| | |
identity map is turned off
|
| | |
|
| |
| |
| |
| | |
JoinDependency::JoinAssociation and into the reflection instead.
|
| |
| |
| |
| | |
the code which support this
|
| |
| |
| |
| | |
underlying problem in the habtm preloader.
|
| |
| |
| |
| | |
identity map is turned off
|
| |
| |
| |
| | |
instantiate one AR object per actual record in the database. (Even when IM is off.)
|
|\| |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/class_methods/join_dependency.rb
activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/associations/has_one_through_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
activerecord/lib/active_record/reflection.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
activerecord/test/cases/associations/has_one_through_associations_test.rb
activerecord/test/cases/reflection_test.rb
activerecord/test/cases/relations_test.rb
activerecord/test/fixtures/memberships.yml
activerecord/test/models/categorization.rb
activerecord/test/models/category.rb
activerecord/test/models/member.rb
activerecord/test/models/reference.rb
activerecord/test/models/tagging.rb
|
| |
| |
| |
| | |
ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations
|
| | |
|
| |
| |
| |
| | |
callbacks etc) rather than calling a whole bunch of methods with rather long names.
|
| | |
|
| | |
|