- 11 2月, 2016 1 次提交
-
-
由 Brian Christian 提交于
-
- 10 2月, 2016 1 次提交
-
-
由 Brian Christian 提交于
-
- 04 2月, 2016 1 次提交
-
-
由 Matthew Draper 提交于
This still isn't as separated as I'd like, but it at least moves most of the burden of alias mapping in one place.
-
- 03 2月, 2016 1 次提交
-
-
由 Himesh 提交于
Changed id-writer to save join table records based on association primary key
-
- 31 1月, 2016 1 次提交
-
-
由 Takashi Kokubun 提交于
-
- 25 1月, 2016 1 次提交
-
-
由 Vipul A M 提交于
Fixes #23209
-
- 18 1月, 2016 1 次提交
-
-
由 yui-knk 提交于
`:foreign_type` is a valid option for `belongs_to` and `has_one` so remove this to `SingularAssociation`.
-
- 14 1月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Arel handles substitution for bind parameters by now.
-
- 21 12月, 2015 1 次提交
-
-
由 Yves Senn 提交于
This reverts commit 537ac7d6, reversing changes made to 9c9c54ab. Reason: The way we preload associations will change the meaning of GROUP BY operations. This is illustrated in the SQL generated by the added test (failing on PG): Association Load: D, [2015-12-21T12:26:07.169920 #26969] DEBUG -- : Post Load (0.7ms) SELECT "posts".* FROM "posts" LEFT JOIN comments ON comments.post_id = posts.id WHERE "posts"."author_id" = $1 GROUP BY posts.id ORDER BY SUM(comments.tags_count) [["author_id", 1]] Preload: D, [2015-12-21T12:26:07.128305 #26969] DEBUG -- : Post Load (1.3ms) SELECT "posts".* FROM "posts" LEFT JOIN comments ON comments.post_id = posts.id WHERE "posts"."author_id" IN (1, 2, 3) GROUP BY posts.id ORDER BY SUM(comments.tags_count)
-
- 16 12月, 2015 1 次提交
-
-
由 Lucjan Suski 提交于
Fixes problem when added `group()` in association scope was lost in eager loaded association.
-
- 07 12月, 2015 1 次提交
-
-
由 Arthur Neves 提交于
The problem was that when saving an object, we would call touch_later on the parent which wont be saved immediteally, and it wont call any callbacks. That was working one level up because we were calling touch, during the touch_later commit phase. However that still didnt solve the problem when you have a 3+ levels of parents to be touched, as calling touch would affect the parent, but it would be too late to run callbacks on its grand-parent. The solution for this, is instead, call touch_later upwards when the first touch_later is called. So we make sure all the timestamps are updated without relying on callbacks. This also removed the hard dependency BelongsTo builder had with the TouchLater module. So we can still have the old behaviour if TouchLater module is not included. [fixes 5f5e6d92] [related #19324]
-
- 23 11月, 2015 1 次提交
-
-
由 Bogdan Gusiev 提交于
When same association is loaded in the model creation callback The new object is inserted into association twice
-
- 16 11月, 2015 1 次提交
-
-
由 yui-knk 提交于
If argument of `build_record` has key and value which is same as default value of database, we should also except the key from `create_scope` in `initialize_attributes`. Because at first `build_record` initialize record object with argument of `build_record`, then assign attributes derived from Association's scope. In this case `record.changed` does not include the key, which value is same as default value of database, so we should add the key to except list. Fix #21893.
-
- 08 11月, 2015 2 次提交
-
-
由 Ehsan Yousefi 提交于
There is no need to to assign reflection name to a variable, because it's called once.
-
由 Yves Senn 提交于
[ci skip] While `JoinDependency` and `JoinDependency::Aliases` were nodoced, the inner `Table` class made them appear in the API.
-
- 30 10月, 2015 4 次提交
-
-
由 Sean Griffin 提交于
Before this commit, if `ActiveRecord::Base.belongs_to_required_by_default` is set to `true`, then creating a record through `has_and_belongs_to_many` fails with the cryptic error message `Left side must exist`. This is because `inverse_of` isn't working properly in this case, presumably since we're doing trickery with anonymous classes in the middle. Rather than following this rabbit hole to try and get `inverse_of` to work in a case that we know is not publicly supported, we can just turn off this validation to match the behavior of 4.2 and earlier.
-
由 Sean Griffin 提交于
This is part of a refactoring to make it easier to allow `order` to use sanitize like just about everything else on relation. The deleted test doesn't give any reasoning as to why passing `nil` to `order` needs to be supported, and it's rather nonsensical. I can almost see allowing an empty string being passed (though I'm tempted to just disallow it...)
-
由 Sean Griffin 提交于
This reverts commit 6dc6a0b1, reversing changes made to ec94f00b. This pull request broke the build.
-
- 29 10月, 2015 1 次提交
-
-
由 akihiro17 提交于
We should call `scope.order!` and set `scope.reordering_value` to `true` if :reordering values are specified Fixes #21886
-
- 27 10月, 2015 4 次提交
- 22 10月, 2015 1 次提交
-
-
由 Bogdan Gusiev 提交于
* less arrays created * less complexity with only one level of nesting in loop
-
- 21 10月, 2015 1 次提交
-
-
由 kal 提交于
-
- 20 10月, 2015 1 次提交
-
-
由 yui-knk 提交于
When `require 'active_support/rails'`, 'active_support/deprecation' is automatically loaded.
-
- 19 10月, 2015 1 次提交
-
-
由 jbranchaud 提交于
With `unscope!` called last, it undoes `where` constraints of the same value when the `where` is chained after the `unscope`. This is what a `rewhere` does. This is undesirable behavior. The included tests demonstrate both the `unscope(...).where(...)` behavior as well as the direct use of `rewhere(...)`. This is in reference to #21955.
-
- 14 10月, 2015 2 次提交
-
-
由 Yves Senn 提交于
The focus of this change is to make the API more accessible. References to method and classes should be linked to make it easy to navigate around. This patch makes exzessiv use of `rdoc-ref:` to provide more readable docs. This makes it possible to document `ActiveRecord::Base#save` even though the method is within a separate module `ActiveRecord::Persistence`. The goal here is to bring the API closer to the actual code that you would write. This commit only deals with Active Record. The other gems will be updated accordingly but in different commits. The pass through Active Record is not completely finished yet. A follow up commit will change the spots I haven't yet had the time to update. /cc @fxn
-
由 Yves Senn 提交于
-
- 13 10月, 2015 2 次提交
- 05 10月, 2015 1 次提交
-
-
由 Bogdan Gusiev 提交于
-
- 29 9月, 2015 1 次提交
-
-
由 Gaurav Sharma 提交于
`ActiveRecord::Associations::JoinDependency` now it’s own class` and `ActiveRecord::Associations::ThroughAssociationScope` doesn’t exists
-
- 27 9月, 2015 1 次提交
-
-
由 amitkumarsuroliya 提交于
-
- 25 9月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
This moves a bit more of the logic required for dirty checking into the attribute objects. I had hoped to remove the `with_value_from_database` stuff, but unfortunately just calling `dup` on the attribute objects isn't enough, since the values might contain deeply nested data structures. I think this can be cleaned up further. This makes most dirty checking become lazy, and reduces the number of object allocations and amount of CPU time when assigning a value. This opens the door (but doesn't quite finish) to improving the performance of writes to a place comparable to 4.1
-
- 17 9月, 2015 1 次提交
-
-
由 yui-knk 提交于
-
- 12 9月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
`restrict_with_error` message will now respect owner’s human name in any locale [kuboon & Ronak Jangir]
-
- 10 9月, 2015 1 次提交
-
-
由 Jimmy Bourassa 提交于
-
- 09 9月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
-