aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/person.rb
Commit message (Collapse)AuthorAgeFilesLines
* Using 1.8.7 syntax for 3-2-stableArun Agrawal2013-05-241-1/+1
|
* Merge pull request #10713 from senny/10693_fix_primary_key_option_on_has_manyRafael Mendonça França2013-05-231-0/+1
| | | | | | | Fix the `:primary_key` option for `has_many` associations. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/associations/has_many_association.rb
* Serialized attribute can be serialized in an integer columnRafael Mendonça França2012-12-211-1/+22
| | | | | | | | | | Fix #8575 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb activerecord/test/cases/serialized_attribute_test.rb activerecord/test/models/person.rb
* Fix deleting from a HABTM join table upon destroying an object of a model ↵Nick Rogers2012-11-131-0/+6
| | | | with optimistic locking enabled. Fixes #5332.
* Use Ruby 1.8 hash syntaxCarlos Antonio da Silva2012-08-211-1/+1
| | | | Introduced in backport 648c5a1369ed64608c3ca43a5ebc917687d20010.
* Merge pull request #5210 from Pliny/masteriRafael Mendonça França2012-08-211-0/+2
| | | | | | | | Fix for #5200 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/counter_cache.rb
* Add test case to has_many through association when mass_assignment_sanitizer isRafael Mendonça França2012-03-081-0/+2
| | | | | | | | :strict Conflicts: activerecord/test/models/person.rb
* added failing tests for has_many, has_one and belongs_to associations with ↵Jakub Kuźma2011-12-211-2/+2
| | | | | | 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>
* 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