- 24 12月, 2016 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 23 12月, 2016 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 06 12月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Raise `ActiveRecord::RangeError` when values that executed are out of range.
-
- 24 11月, 2016 1 次提交
-
-
由 Dominic Cleal 提交于
9c9fb19b changed the behaviour of the _ids= setters for associations to raise an AssociationTypeMismatch when unknown IDs are given: Class: <ActiveRecord::AssociationTypeMismatch> Message: <"Developer(#43811860) expected, got NilClass(#16732720)"> This restores the original ActiveRecord::RecordNotFound exception with a much clearer error message: Class: <ActiveRecord::RecordNotFound> Message: <"Couldn't find all Developers with 'id': (1, -9999) [WHERE \"contracts\".\"company_id\" = ?] (found 1 results, but was looking for 2)"> Fixes #25719
-
- 14 11月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All query methods calls `spawn` and bang method, but only `none` is not.
-
- 09 11月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Records fetching order is very important for performance if `limit` is presented. Should not except the order in the case. And `exists?` replaces select list to `1 AS one` therefore `:distinct` is useless (`DISTINCT 1 AS one`). And PostgreSQL raises the following error if `:distinct` and `:order` are used in the same time. ``` ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list ```
-
- 06 11月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
If `limit_value` is presented, records fetching order is very important for performance. Should not unscope the order in the case.
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 27 10月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
Regexp#match? should be considered to be part of the Ruby core library. We are emulating it for < 2.4, but not having to require the extension is part of the illusion of the emulation.
-
- 22 10月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- CollectionAssociation#select was removed in https://github.com/rails/rails/pull/25989 in favor of QueryMethods#select but it caused a regression when passing arguments to select and a block. - This used to work earlier in Rails 4.2 and Rails 5. See gist https://gist.github.com/prathamesh-sonpatki/a7df922273473a77dfbc742a4be4b618. - This commit restores the behavior of Rails 4.2 and Rails 5.0.0 to allow passing arguments and block at the same time but also deprecates it. - Because, these arguments do not have any effect on the output of select when select is used with a block. - Updated documentation to remove the example passing arguments and block at the same time to `CollectionProxy#select`.
-
- 04 10月, 2016 1 次提交
-
-
由 Keenan Brock 提交于
-
- 27 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 23 9月, 2016 1 次提交
-
-
由 v.promzelev 提交于
-
- 14 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
-
- 11 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`column_for` was changed to `type_for` to return `type` object at 36bd52b4. But variable name is still `column`. It is very confusing. Rename variable name `column` to `type` for readability.
-
- 10 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
In most case `where` is called with passed hash. In the case initializing `binds` is unnecessary.
-
- 06 9月, 2016 2 次提交
-
-
由 Alex Kitchens 提交于
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco (bb1ecdcc and below). Some of the case statements were missed. This changes the case statements' formatting and is consistent with changes in 810dff7c and db63406c.
-
由 yui-knk 提交于
Bang methods of `AR::QueryMethods` are used only internally. We only use `left_outer_joins!`, so we can remove this alias.
-
- 03 9月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
All indentation was normalized by rubocop auto-correct at 80e66cc4. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency.
-
- 01 9月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This reverts commit 3a1f6fe7. This commit takes the code in a direction that I am looking to avoid. The predicate builder should be purely concerned with AST construction as it matters to methods like `where`. Things like case sensitivity should continue to be handled elsewhere.
-
- 31 8月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This was almost every case where we are overriding `respond_to?` in a way that mirrors a parallel implementation of `method_missing`. There is one remaining case in Active Model that should probably do the same thing, but had a sufficiently strange implementation that I want to investigate it separately. Fixes #26333.
-
- 26 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
For reduce instantiating `Type::Value`.
-
- 23 8月, 2016 1 次提交
-
-
由 Bogdan Gusiev 提交于
Introduced low level methods #set_value and #get_value for setting query attributes: relation.set_value(:where, {id: 1}) relation.get_value(:includes) Used those internally when working with relation's attributes at the abstract level
-
- 18 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently `CollectionProxy` inherits `Relation` therefore we can use its own methods rather than delegating to collection association.
-
- 17 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 16 8月, 2016 5 次提交
-
-
由 Ryuta Kamizono 提交于
Otherwise CollectionProxy's bang methdos cannot respect dirty target.
-
由 Maxime Lapointe 提交于
The current behaviour of checking if there is a LEFT OUTER JOIN arel node to detect if we are doing eager_loading is wrong. This problem wasn't frequent before as only some pretty specific cases would add a LEFT OUTER JOIN arel node. However, the recent new feature left_outer_joins also add this node and made this problem happen frequently. Since in the perform_calculation function, we don't have access to eager_loading information, I had to extract the logic for the distinct out to the calculate method. As I was in the file for left_outer_join tests, I fixed a few that had bugs and I replaced some that were really weak with something that will catch more issues. In relation tests, the first test I changed would have failed if it had validated the hash returned by count instead of just checking how many pairs were in it. This is because this merge of join currently transforms the join node into an outer join node, which then made count do a distinct. So before this change, the return was {1=>1, 4=>1, 5=>1}.
-
由 Ryuta Kamizono 提交于
Currently uniqueness validator is coupled with building Arel ASTs. This commit extracts `PredicateBuilder::CaseSensitiveHandler` for decouple the building Arel ASTs.
-
由 Ryuta Kamizono 提交于
If handled as an associated predicate even though a table has the column, will generate invalid SQL by valid column name treated as a table name.
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 15 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`find_nth` is protected method, therefore `offset` has not been passed anywhere. `find_nth_with_limit_and_offset` is unnecessary anymore because `offset` has not been passed.
-
- 14 8月, 2016 1 次提交
-
-
由 Michel Pigassou 提交于
When calling association.find RecordNotFound is now raised with the same argument as when we do it in Record.find (primary_key, id and model).
-
- 13 8月, 2016 1 次提交
-
-
由 Michael Grosser 提交于
-
- 11 8月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
Currently predicate builder cannot build a predicate for `array|range` attribute. This commit fixes the issue. Related #25671.
-
由 Ryuta Kamizono 提交于
Currently association queries cannot be preparable. ```ruby Post.where(author_id: 1).to_a # => SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = ? [["author_id", 1]] Post.where(author: 1).to_a # => SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 ``` To make association queries to preparable, it should be handled in `create_binds_for_hash`. This change is a first step for it.
-
- 08 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
-
由 Xavier Noria 提交于
Some case expressions remain, need to think about those ones.
-
- 07 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-