aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/person.rb
Commit message (Collapse)AuthorAgeFilesLines
* Pass mass-assignment options to nested models - closes #1673.Andrew White2011-06-131-2/+6
|
* singular and collection relations in AR can now specify mass-assignment ↵Josh Kalderimis2011-05-011-6/+17
| | | | security options (:as and :without_protection) in build, create and create! methods.
* Added assign_attributes to Active Record which accepts a mass-assignment ↵Josh Kalderimis2011-04-241-0/+19
| | | | security scope using the :as option, while also allowing mass-assignment security to be bypassed using :with_protected
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-1/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Allow building and then later saving has_many :through records, such that ↵Jon Leighton2011-02-181-0/+2
| | | | | | | | 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]
| * Support the :dependent option on has_many :through associations. For ↵Jon Leighton2011-02-071-1/+26
| | | | | | | | historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
| * Fix hm:t to self table aliasing in construct_scopeErnie Miller2010-12-161-0/+1
| |
* | Fix naughty trailing whitespaceJon Leighton2010-10-311-1/+1
| |
* | Add support for nested through associations in JoinAssociation. Hence ↵Jon Leighton2010-10-091-0/+3
|/ | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored.
* Ensure default_scope can be overwriten by association conditions.José Valim2010-07-211-0/+1
|
* eagerly loaded association records should respect default_scope [#2931 ↵Subba Rao Pasupuleti2010-07-211-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename named_scope to scopePratik Naik2010-01-181-2/+2
|
* Fixed limited eager loading associations with numbers in the name [#2668 ↵Benjamin Floering2009-05-181-0/+1
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Preload uses exclusive scope [#643 state:resolved]Frederick Cheung2008-12-261-0/+6
| | | | | | | | | With self referential associations, the scope for the the top level should not affect fetching of associations, for example when doing Person.male.find :all, :include => :friends we should load all of the friends for each male, not just the male friends.
* fix eager loading with dynamic findersBrandon Keepers2008-06-091-1/+1
|
* Ensure table names are quoted by the association preloading code.Frederick Cheung2008-04-261-0/+5
| | | | | | [#45 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Make dynamic finders respect the :include on HasManyThrough associations. ↵Michael Koziarski2008-02-181-0/+1
| | | | | | Closes #10998. [cpytel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-181-0/+4
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de