- 23 8月, 2015 1 次提交
-
-
由 Ronak Jangir 提交于
-
- 20 7月, 2015 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
-
- 18 7月, 2015 1 次提交
-
-
由 Andrii Ponomarov 提交于
-
- 03 6月, 2015 1 次提交
-
-
由 Roque Pinel 提交于
Improve the guide about `has_many` `collection.clear` to indicate the behavior for each dependent strategy according to `collection.delete_all`. Based on #17179, I changed the `collection.delete` docs to also clarify the default strategy for each `hm` and `hm:t` associations. Fixes #20170.
-
- 07 3月, 2015 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- CollectionProxy#clear method calls delete_all so the SQL is directly run into the database. - So the updated_at column of the object on which its run is not updated. - Closes #17161
-
- 28 2月, 2015 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 21 2月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 02 1月, 2015 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 30 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Fixes #18237
-
- 27 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Construction of relations can be a hotspot, we don't want to create one of these in the constructor. This also allows us to do more expensive things in the predicate builder's constructor, since it's created once per AR::Base subclass
-
- 04 10月, 2014 1 次提交
-
-
由 eileencodes 提交于
For detailed testing of behavior see: https://gist.github.com/eileencodes/5b0a2fe011dcff6203fe This shows destroy_all always destroys records and fires callbacks. It will never use nullify or delete_all delete_all's behavior varies greatly based on `hm` vs `hm:t` and deletion strategy.
-
- 27 8月, 2014 4 次提交
-
-
由 Tom Kadwill 提交于
-
由 Tom Kadwill 提交于
-
由 Tom Kadwill 提交于
-
由 Tom Kadwill 提交于
-
- 07 4月, 2014 1 次提交
-
-
由 eileencodes 提交于
This method no longer returns an array of all records that have been removed. Correct documentation to reflect this change. See issue 14546
-
- 03 4月, 2014 1 次提交
-
-
由 Jefferson Lai 提交于
CollectionProxy should be able to reuse the behavior (methods) of its parent class, but with its own state. This change allows CollectionProxy to use the arel object corresponding to its association's scope.
-
- 22 1月, 2014 4 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Kelsey Schlarman 提交于
Need to define #reset on CollectionProxy.
-
由 Jason Meller 提交于
This commit fixes two regressions introduced in cafe31a0 where newly created finder methods #second, #third, #forth, and #fifth caused a NoMethodError error on reload associations and where we were pulling the wrong element out of cached associations. Examples: some_book.authors.reload.second # Before # => NoMethodError: undefined method 'first' for nil:NilClass # After # => #<Author id: 2, name: "Sally Second", ...> some_book.first.authors.first some_book.first.authors.second # Before # => #<Author id: 1, name: "Freddy First", ...> # => #<Author id: 1, name: "Freddy First", ...> # After # => #<Author id: 1, name: "Freddy First", ...> # => #<Author id: 2, name: "Sally Second", ...> Fixes #13783.
-
由 Kuldeep Aggarwal 提交于
-
- 04 1月, 2014 1 次提交
-
-
由 T.J. Schuck 提交于
-
- 11 12月, 2013 2 次提交
-
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
It is needed for activerecord-depecated_finders This reverts commit dcff027a, reversing changes made to 3a209398.
-
- 12 11月, 2013 1 次提交
-
-
由 Prem Sichanugrist 提交于
According to our guideline, we leave 1 space between `#` and `=>`, so we want `# =>` instead of `#=>`. Thanks to @fxn for the suggestion. [ci skip]
-
- 24 10月, 2013 1 次提交
-
-
由 Peter Jaros 提交于
-
- 13 10月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 22 8月, 2013 1 次提交
-
-
由 edogawaconan 提交于
-
- 02 7月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 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)`
-
- 28 6月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
The previous implementation was necessary in order to support stuff like: class Post < ActiveRecord::Base default_scope where(published: true) scope :ordered, order("created_at") end If we didn't evaluate the default scope at the last possible moment before sending the SQL to the database, it would become impossible to do: Post.unscoped.ordered This is because the default scope would already be bound up in the "ordered" scope, and therefore wouldn't be removed by the "Post.unscoped" part. In 4.0, we have deprecated all "eager" forms of scopes. So now you must write: class Post < ActiveRecord::Base default_scope { where(published: true) } scope :ordered, -> { order("created_at") } end This prevents the default scope getting bound up inside the "ordered" scope, which means we can now have a simpler/better/more natural implementation of default scoping. A knock on effect is that some things that didn't work properly now do. For example it was previously impossible to use #except to remove a part of the default scope, since the default scope was evaluated after the call to #except.
-
- 18 6月, 2013 1 次提交
-
-
由 Yves Senn 提交于
-
- 13 5月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
Cleaned up rdoc a bit emphasizing that callbacks are called. Also removed the stress on the fact that records are always removed. If callbacks return false then records will not be deleted.
-
- 10 5月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
-
- 08 4月, 2013 1 次提交
-
-
由 Dan Erikson 提交于
This makes the arguments the same as ActiveRecord::QueryMethods::select.
-
- 03 4月, 2013 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 James Golick 提交于
-
- 30 3月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 15 3月, 2013 1 次提交
-
-
由 Yves Senn 提交于
The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our Relation API is close to SQL terms I renamed `#uniq` to `#distinct`. There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue to work. I also updated the documentation to promote the use of `#distinct`.
-
- 02 3月, 2013 1 次提交
-
-
由 Yves Senn 提交于
Closes #7364. Collection associations behave similar to Arrays. However there is no way to prepend records. And to append one should use `<<`. Before this patch `#append` and `#prepend` did not add the record to the loaded association. `#append` now behaves like `<<` and `#prepend` is not defined.
-