aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/member.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Fix preloading association with scope including joinsRyuta Kamizono2017-07-041-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* modernizes hash syntax in activerecordXavier Noria2016-08-061-19/+19
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Skip statement cache on through association readerRafael Mendonça França2015-08-121-0/+3
| | | | | | | If the through class has default scopes we should skip the statement cache. Closes #20745.
* Raise an error for has_one associations which try to go :through a ↵Tu Hoang2014-10-151-0/+3
| | | | polymorphic association [#17263]
* More unused associations in AR test modelsAkira Matsuda2013-09-101-1/+0
|
* Revert "Merge branch 'master' of github.com:rails/docrails"Vijay Dev2013-08-171-0/+1
| | | | | | | This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9. Seems to be a code merge done by mistake.
* More unused associations in AR test modelsAkira Matsuda2013-07-251-1/+0
|
* Getting rid of the +automatic_inverse_of: false+ option in associations in favorwangjohn2013-06-081-1/+1
| | | | | of using +inverse_of: false+ option. Changing the documentation and adding a CHANGELOG entry for the automatic inverse detection feature.
* Created a method to automatically find inverse associations and cachewangjohn2013-05-071-1/+1
| | | | | | the results. Added tests to check to make sure that inverse associations are automatically found when has_many, has_one, or belongs_to associations are defined.
* Use method compilation for association methodsJon Leighton2012-08-101-3/+2
| | | | | | | | | Method compilation provides better performance and I think the code comes out cleaner as well. A knock on effect is that methods that get redefined produce warnings. I think this is a good thing. I had to deal with a bunch of warnings coming from our tests, though.
* Convert association macros to the new syntaxJon Leighton2012-07-201-3/+3
|
* Improve the derivation of HABTM assocation join table namesAndrew White2012-06-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the derivation of HABTM join table name to take account of nesting. It now takes the table names of the two models, sorts them lexically and then joins them, stripping any common prefix from the second table name. Some examples: Top level models (Category <=> Product) Old: categories_products New: categories_products Top level models with a global table_name_prefix (Category <=> Product) Old: site_categories_products New: site_categories_products Nested models in a module without a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: categories_products Nested models in a module with a table_name_prefix method (Admin::Category <=> Admin::Product) Old: categories_products New: admin_categories_products Nested models in a parent model (Catalog::Category <=> Catalog::Product) Old: categories_products New: catalog_categories_products Nested models in different parent models (Catalog::Category <=> Content::Page) Old: categories_pages New: catalog_categories_content_pages Also as part of this commit the validity checks for HABTM assocations have been moved to ActiveRecord::Reflection One side effect of this is to move when the exceptions are raised from the point of declaration to when the association is built. This is consistant with other association validity checks.
* Don't use select() values from the join model of a through association. ↵Jon Leighton2011-05-111-0/+2
| | | | Fixes #508.
* Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-041-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Has many through - It is not necessary to manually merge in the conditions ↵Jon Leighton2011-01-301-0/+3
| | | | | | | | hash for the through record, because the creation is done directly on the through association, which will already handle setting the conditions.
| * Verify that has_one :through preload respects the :conditions [#2976 ↵Will Bryant2010-12-231-0/+1
| | | | | | | | state:resolved]
| * Don't allow a has_one association to go :through a collection association ↵Jon Leighton2010-12-231-3/+6
| | | | | | | | [#2976 state:resolved]
* | Fix naughty trailing whitespaceJon Leighton2010-10-311-4/+4
| |
* | Add test_has_one_through_has_one_through_with_belongs_to_source_reflectionJon Leighton2010-10-141-0/+2
| |
* | Add test_has_many_through_has_one_through_with_has_many_source_reflectionJon Leighton2010-10-121-0/+1
| |
* | Adding test_has_many_through_has_one_with_has_many_through_source_reflection ↵Jon Leighton2010-10-121-0/+2
| | | | | | | | and modifying ThroughAssociationScope to make it work correctly.
* | Add test_has_many_through_has_one_throughJon Leighton2010-10-121-0/+3
| |
* | Support has_one through assocs as the source associationJon Leighton2010-10-121-1/+4
|/
* Fix preloading of has_one :through associations on belongs_to [#1507 ↵Matt Jones2008-12-181-0/+1
| | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
* fix assignment to has_one :through associations.Matt Jones2008-11-151-0/+2
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Add has_one :through support, finally. Closes #4756 [thechrisoshow]Rick Olson2008-03-211-0/+9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de