aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_load_nested_include_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix `automatic_inverse_of` not to be disabled if extension block is givenRyuta Kamizono2019-04-121-2/+2
| | | | | | | | If an association has a scope, `automatic_inverse_of` is to be disabled. But extension block is obviously not a scope. It should not be regarded as a scope. Fixes #28806.
* Use `assert_no_queries` not to ignore BEGIN/COMMIT queriesRyuta Kamizono2018-10-051-1/+1
| | | | | | | | | `test_update_does_not_run_sql_if_record_has_not_changed` would pass without #18501 since `assert_queries` ignores BEGIN/COMMIT unless `ignore_none: true` is given. Since #32647, empty BEGIN/COMMIT is ommited. So we no longer need to use `assert_queries(0)` to ignore BEGIN/COMMIT in the queries.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* 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
|
* Privatize unneededly protected methods in Active Record testsAkira Matsuda2016-12-241-1/+1
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-2/+0
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-20/+20
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-12/+12
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-3/+1
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-2/+2
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* Deprecate ActiveRecord::Base.scoped.Jon Leighton2012-07-271-2/+2
| | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
* ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-271-1/+1
| | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* Remove unused assignments from activerecord testsMark Rushakoff2012-04-291-1/+0
|
* find and replace deprecated keysJon Leighton2012-04-271-1/+1
|
* %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵Jon Leighton2012-04-271-1/+1
| | | | things
* remove deprecate #all usageJon Leighton2012-04-261-1/+1
|
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-1/+1
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-1/+1
|
* remove requires of core_ext/array/random_access that no longer existslest2011-12-211-1/+0
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* require tag since we need it for this testAaron Patterson2011-02-071-0/+1
|
* Add missing requireSantiago Pastorino2011-01-141-0/+1
|
* removes Array#random_element and backports Array#sample from Ruby 1.9, ↵Xavier Noria2010-06-051-7/+7
| | | | thanks to Marc-Andre Lafortune
* Change on Array extension from rand => random_element [#4555 state:committed]Santiago Pastorino2010-05-161-7/+7
| | | | Signed-off-by: Xavier Noria <fxn@hashref.com>
* Don't use local vars before testing its conditional.Emilio Tagua2009-08-031-2/+0
|
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
|
* Use DependencyModule for included hooks in ActiveRecordBryan Helmkamp2009-05-111-7/+6
|
* Fix models load order to be able to run unit tests.Emilio Tagua2009-04-231-5/+5
| | | | | | [#2550 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure NoMethodError isn't raised when some of the nested eager loaded ↵Murray Steele2009-03-121-0/+29
| | | | | | associations are empty [#1696 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* remember created records and select a random one instead of relying on ↵S. Brent Faulkner2008-08-211-12/+30
| | | | | | sequential id values starting at 1 Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Move the eager load nested include tables into schema.rb and use delete_all ↵Michael Koziarski2008-02-201-64/+38
| | | | | | instead of drop table to reset the state. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove disconnect! in test case, it causes segfaults on sqlite3 and ↵Michael Koziarski2008-02-201-6/+2
| | | | | | completely destroys postgresql git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove mysql option from a test that applies to all databases. References ↵Jeremy Kemper2008-02-191-5/+4
| | | | | | #11154. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't assume all records from nested include are of same class. Closes ↵Jeremy Kemper2008-02-191-0/+114
#11154 [acechase] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de