| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
| |
| |
| | |
'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
|
| |
| |
| |
| | |
proxy type on assignment.
|
| |
| |
| |
| | |
accessing the instance variables
|
| | |
|
| | |
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/lib/active_record/associations/association.rb
activerecord/lib/active_record/fixtures.rb
|
| | |
| | |
| | |
| | | |
manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
|
| | | |
|
| | |
| | |
| | |
| | | |
the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
|
| | | |
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/examples/performance.rb
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/association_proxy.rb
activerecord/lib/active_record/autosave_association.rb
activerecord/lib/active_record/base.rb
activerecord/lib/active_record/nested_attributes.rb
activerecord/test/cases/relations_test.rb
|
| | |
| | |
| | |
| | | |
also use a transaction. IMO this is reasonable given that the before_add and after_add callbacks might do anything, and this great consistency allows us to abstract out the duplicate code from #build and #create.
|
| | | |
|
| | | |
|