- 18 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
If the through record gets created in an `after_create` hook that is defined before the association is defined (therefore after its `after_create` hook) get saved twice. This ensures that the through records are created only once, regardless of the order of the hooks.
-
- 14 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
member = Member.new(club: Club.new) member.save! Before: member.current_membership.club_id # => nil After: member.current_membership.club_id # => club's id
-
- 29 4月, 2014 1 次提交
-
-
由 eileencodes 提交于
Since clear shouldn't fire callbacks the order doesn't matter since it was never updated. Remove the portion of this test that tests for order after clear.
-
- 23 4月, 2014 2 次提交
-
-
由 Rafael Mendonça França 提交于
This file is using this pattern already
-
由 Rafael Mendonça França 提交于
-
- 03 4月, 2014 1 次提交
-
-
由 Jan Habermann 提交于
-
- 20 2月, 2014 1 次提交
-
-
由 Arthur Neves 提交于
[related #14116]
-
- 17 11月, 2013 1 次提交
-
-
由 Ivan Antropov 提交于
-
- 12 11月, 2013 1 次提交
-
-
由 dm1try 提交于
when destroying a record on a has_many :through association. :destroy method has own counter_cache callbacks.
-
- 28 10月, 2013 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Paul Nikitochkin 提交于
Fixes: #12242, #9517, #10240
-
- 09 10月, 2013 1 次提交
-
-
由 Arun Agrawal 提交于
original commit 89984419 Reverted here ec8ef1e1
-
- 28 9月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
side of a hm:t association along with preloading.
-
- 25 9月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
conditionals from the individual preloaded classes
-
- 24 9月, 2013 3 次提交
-
-
由 Aaron Patterson 提交于
and possibly different rules for finding those objects
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 12 9月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 07 9月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 04 9月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 31 8月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 30 8月, 2013 2 次提交
-
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
- 18 8月, 2013 1 次提交
-
- 03 8月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 26 7月, 2013 1 次提交
-
-
由 Karunakar (Ruby) 提交于
-
- 09 7月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
Closes #11248.
-
- 30 6月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
Method `delete_all` should not be invoking callbacks and this feature was deprecated in Rails 4.0. This is being removed. `delete_all` will continue to honor the `:dependent` option. However if `:dependent` value is `:destroy` then the default deletion strategy for that collection will be applied. User can also force a deletion strategy by passing parameter to `delete_all`. For example you can do `@post.comments.delete_all(:nullify)`
-
- 05 4月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
fixes #10016
-
- 28 1月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
This caused a bug with the new associations implementation, because now association conditions are represented as Arel nodes internally right up to when the whole thing gets turned to SQL. In Rails 3.2, association conditions get turned to raw SQL early on, which prevents Relation#merge from interfering. The current implementation was buggy when a default_scope existed on the target model, since we would basically end up doing: default_scope.merge(association_scope) If default_scope contained a where(foo: 'a') and association_scope contained a where(foo: 'b').where(foo: 'c') then the merger would see that the same column is representated on both sides of the merge and collapse the wheres to all but the last: where(foo: 'c') Now, the RHS of the merge is left alone. Fixes #8990
-
- 18 1月, 2013 2 次提交
-
-
由 Guillermo Iguaran 提交于
This reverts commit 637a7d9d, reversing changes made to 5937bd02.
-
由 robertomiranda 提交于
-
- 04 1月, 2013 1 次提交
-
-
- 15 12月, 2012 1 次提交
-
-
由 Matthew Robertson 提交于
This commit fixes reported issue #7630 in which counter caches were not being updated properly when replacing has_many_through relationships
-
- 12 11月, 2012 1 次提交
-
-
由 Vipul A M 提交于
-
- 10 10月, 2012 1 次提交
-
-
由 Yves Senn 提交于
-
- 05 10月, 2012 2 次提交
-
-
由 Santiago Pastorino 提交于
This reverts commit abf8de85. We should take a deeper look to those cases flat_map doesn't do deep flattening. irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten => [1, 3, 1, 2] irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i} => [[1, 3], [1, 2]]
-
由 Santiago Pastorino 提交于
-
- 04 10月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
Patches `CollectionAssociation#count` to return 0 without querying if the parent record is new. Consider the following code: class Account has_many :dossiers end class Dossier belongs_to :account end a = Account.new a.dossiers.build # before patch a.dossiers.count # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL # => 0 # after a.dosiers.count # fires without sql query # => 0 Fixes #1856.
-
- 17 9月, 2012 1 次提交
-
-
由 Ernie Miller 提交于
If assigning to a has_many :through collection against an unsaved object using the collection=[<array_of_items>] syntax, the join models were not properly created, previously.
-