Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add missing test case for `find` with a large number | Ryuta Kamizono | 2018-06-22 | 1 | -0/+6 |
| | |||||
* | Address CI failure due to non-deterministic query result | Ryuta Kamizono | 2018-05-06 | 1 | -1/+1 |
| | | | | https://travis-ci.org/rails/rails/jobs/375326992#L1160-L1166 | ||||
* | Replace `assert !` with `assert_not` | Daniel Colson | 2018-04-19 | 1 | -2/+2 |
| | | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd. | ||||
* | Fix `#columsn_for_distinct` of MySQL and PostgreSQL | kg8m | 2018-02-27 | 1 | -0/+5 |
| | | | | | | | Prevent `ActiveRecord::FinderMethods#limited_ids_for` from using correct primary key values even if `ORDER BY` columns include other table's primary key. Fixes #28364. | ||||
* | More exercise range predicate builder | Ryuta Kamizono | 2018-02-23 | 1 | -0/+9 |
| | | | | | * Add test case for open-ended range. * Add test case for numeric range for string column. | ||||
* | Fix expanding an array of `composed_of` objects which have multiple mappings | Ryuta Kamizono | 2018-01-29 | 1 | -4/+5 |
| | | | | | | | | | Follow up of #31724. If `composed_of` objects have multiple mappings, array predicate handler can not correctly handle the expanded condition. We need to handle it like polymorphic association objects. | ||||
* | Merge pull request #31724 from orekyuu/fix-expand-composed-object-array | Ryuta Kamizono | 2018-01-29 | 1 | -0/+18 |
|\ | | | | | | | Fix not expanded problem when passing an Array object as argument to the where method using composed_of column. | ||||
| * | Allow expanding an array of `composed_of` objects | Ryuta Kamizono | 2018-01-29 | 1 | -3/+2 |
| | | |||||
| * | Fix not expanded problem when passing an Array object as argument to the ↵ | orekyuu | 2018-01-26 | 1 | -0/+19 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | where method using composed_of column. Fixes #31723 ``` david_balance = customers(:david).balance Customer.where(balance: [david_balance]).to_sql # Before: WHERE `customers`.`balance` = NULL # After : WHERE `customers`.`balance` = 50 ``` | ||||
* | | Use assert_predicate and assert_not_predicate | Daniel Colson | 2018-01-25 | 1 | -2/+2 |
|/ | |||||
* | Make `relation.exists?` more performant when using eager loading | Ryuta Kamizono | 2018-01-11 | 1 | -10/+12 |
| | | | | | | `relation.exists?` just wants to know if there is a result or not, does not need the exact records matched. Therefore, an intermediate SELECT query for eager loading is not necessary. | ||||
* | resolve inconsistencies between first and to_a.first with limit | Brian Christian | 2018-01-09 | 1 | -0/+18 |
| | |||||
* | Fix `last` with `offset` to behave consistently with loaded relation | Ryuta Kamizono | 2018-01-07 | 1 | -8/+4 |
| | | | | | | Currently `last` with `offset` behaves incorrectly because `offset` can not be reversed like `limit`. Therefore, `offset` should also be handled like `limit`. | ||||
* | assert_nothing_raised not required here, we can assert directly for the ↵ | Prathamesh Sonpatki | 2017-12-19 | 1 | -4/+2 |
| | | | | actual result | ||||
* | Enable `Layout/LeadingCommentSpace` to not allow cosmetic changes in the future | Ryuta Kamizono | 2017-12-14 | 1 | -1/+1 |
| | | | | Follow up of #31432. | ||||
* | Enable `Layout/SpaceBeforeComma` rubocop rule, and fixed more | Ryuta Kamizono | 2017-12-12 | 1 | -1/+1 |
| | | | | Follow up of #31390. | ||||
* | Revert "Merge pull request #31006 from ↵ | eileencodes | 2017-11-26 | 1 | -16/+0 |
| | | | | | | | | | | | rails/kamipo/ordinal_methods_should_respect_loaded_records" This reverts commit 0f79ab91150b4cdb6c018530978a3395962c7a02, reversing changes made to d575f7f2e737739302a0e8210d01c10f5d4e2c35. This PR philosophically conflicts with #30800 and Matthew thinks we should hold off merging this until we find concensus. Reverting since we're about to cut a release for 5.2. | ||||
* | Merge pull request #31184 from TheSmartnik/fix_record_not_found_on_reload | Rafael França | 2017-11-25 | 1 | -0/+15 |
|\ | | | | | Provide arguments to RecordNotFound | ||||
| * | Provide arguments to RecordNotFound | Nikita Misharin | 2017-11-25 | 1 | -0/+15 |
| | | |||||
* | | Merge pull request #31006 from ↵ | Eileen M. Uchitelle | 2017-11-25 | 1 | -0/+16 |
|\ \ | |/ |/| | | | | | rails/kamipo/ordinal_methods_should_respect_loaded_records Ordinal methods should respect loaded records | ||||
| * | Ordinal methods should respect loaded records | Ryuta Kamizono | 2017-10-28 | 1 | -0/+16 |
| | | | | | | | | | | | | We should reset partially loaded `@offsets` cache when latest records has loaded because the cache has been staled and it may not be consistent with latest records. | ||||
* | | try using regexes | Ben Toews | 2017-11-09 | 1 | -7/+7 |
| | | |||||
* | | allow table name and direction in string order arg | Ben Toews | 2017-11-09 | 1 | -11/+11 |
| | | |||||
* | | work around deprecation warnings in a bunch of tests | Ben Toews | 2017-11-09 | 1 | -20/+20 |
|/ | |||||
* | All test cases for `exists?` places in `finder_test.rb` to ease to find the ↵ | Ryuta Kamizono | 2017-10-09 | 1 | -0/+26 |
| | | | | test cases | ||||
* | Fix `relation.exists?` with has_many through associations | Ryuta Kamizono | 2017-10-09 | 1 | -0/+8 |
| | | | | | `relation.exists?` should reference correct aliases while joining tables of has_many through associations. | ||||
* | Merge pull request #29720 from gaurish/ar_find_error_message_improvement | Rafael França | 2017-08-11 | 1 | -1/+1 |
|\ | | | | | Return Not found Ids in ActiveRecord::NotFound | ||||
| * | Return Not found Ids in ActiveRecord::NotFound | Gaurish Sharma | 2017-07-29 | 1 | -1/+1 |
| | | | | | | | | | | This builds on top of 15e2da656f41af0124f7577858536f3b65462ad5. now it also returns exact Ids which were not found which will be debugging simple. | ||||
* | | Merge pull request #29842 from kamipo/fix_find_by_with_range | Matthew Draper | 2017-08-02 | 1 | -0/+4 |
|\ \ | |/ |/| | Fix `find_by` with range conditions | ||||
| * | Fix `find_by` with range conditions | Ryuta Kamizono | 2017-07-20 | 1 | -0/+4 |
| | | | | | | | | | | `StatementCache` doesn't support range conditions. So we need to through the args to `FinderMethods#find_by` if range value is passed. | ||||
* | | Use frozen-string-literal in ActiveRecord | Kir Shatrov | 2017-07-19 | 1 | -0/+2 |
|/ | |||||
* | Skip query cache for in_batches and friends | Eugene Kenny | 2017-07-06 | 1 | -0/+28 |
| | | | | | | | | | | | The `find_each`, `find_in_batches` and `in_batches` APIs usually operate on large numbers of records, where it's preferable not to load them all into memory at once. If the query cache is enabled, it will hold onto the query results until the end of the execution context (request/job), which means the memory used is still proportional to the total number of records. These queries are typically not repeated, so the query cache isn't desirable here. | ||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Remove the redundant `test_find_all_with_join` in AR | Koichi ITO | 2017-06-02 | 1 | -10/+0 |
| | |||||
* | Remove a redundant test assertion | Koichi ITO | 2017-05-27 | 1 | -1/+0 |
| | |||||
* | exclude ORDER BY clause for exists? (#28699) | Boris Slobodin | 2017-04-10 | 1 | -0/+5 |
| | |||||
* | More exercise `exists?` tests | Ryuta Kamizono | 2017-04-08 | 1 | -5/+18 |
| | |||||
* | Fix `find_nth` with `limit_value` | Ryuta Kamizono | 2017-02-26 | 1 | -3/+3 |
| | | | | | If the `index` exceeds a `limit`, simply return an empty result without querying the database. | ||||
* | Correct spelling | Benjamin Fleischer | 2017-02-05 | 1 | -4/+4 |
| | | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ``` | ||||
* | Fix `find_by` and `where` consistency | Ryuta Kamizono | 2017-01-04 | 1 | -0/+5 |
| | | | | | | | | | | The alternative of #26213. Currently `find_by` and `where` with AR object return inconsistent result. This is caused by statement cache does not support AR object. Passing to finder method to fix the issue. Fixes #26210. | ||||
* | Fix test name `deprecated` to `not_permitted` | Ryuta Kamizono | 2017-01-03 | 1 | -2/+2 |
| | | | | Follow up to 4b6709e818177792735e99a70ec03210c0ac38dc. | ||||
* | Raise ArgumentError when a instance of ActiveRecord::Base is passed to | Rafael Mendonça França | 2017-01-03 | 1 | -3/+3 |
| | | | | find and exists? | ||||
* | Raises IrreversibleOrderError when using last with an irreversible order | Rafael Mendonça França | 2016-12-29 | 1 | -1/+1 |
| | |||||
* | "Use assert_nil if expecting nil. This will fail in minitest 6." | Akira Matsuda | 2016-12-25 | 1 | -12/+12 |
| | |||||
* | Privatize unneededly protected methods in Active Record tests | Akira Matsuda | 2016-12-24 | 1 | -1/+1 |
| | |||||
* | Remove duplicated line | Ryuta Kamizono | 2016-12-11 | 1 | -1/+0 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -26/+26 |
| | |||||
* | improve error message when include assertions fail | Michael Grosser | 2016-09-16 | 1 | -3/+3 |
| | | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong | ||||
* | Merge pull request #25671 from ↵ | Rafael França | 2016-08-16 | 1 | -2/+2 |
|\ | | | | | | | | | kamipo/dont_handle_as_associated_predicate_if_table_has_column Do not handle as an associated predicate if a table has the column |