- 17 8月, 2012 1 次提交
-
-
由 Ernie Miller 提交于
This is at best a band-aid for a more proper fix, since it won't truly handle the removal of the previous equality condition of these other nodes. I'm planning to put in some work on ARel toward supporting that goal. Related: rails/arel#130, ernie/squeel#153, ernie/squeel#156
-
- 15 8月, 2012 1 次提交
-
-
由 Roman Shatsov 提交于
-
- 03 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
-
- 02 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This method explicitly loads the records and then returns `self`. Rather than deciding between "do I want an array or a relation?", most people are actually asking themselves "do I want to eager load or lazy load?" Therefore, this method provides a way to explicitly eager-load without having to switch from a `Relation` to an array. Example: @posts = Post.where(published: true).load
-
- 31 7月, 2012 1 次提交
-
-
由 Bogdan Gusiev 提交于
User.order("name asc").order("created_at desc") # SELECT * FROM users ORDER BY created_at desc, name asc This also affects order defined in `default_scope` or any kind of associations.
-
- 28 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
-
- 27 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
-
- 13 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 07 7月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Damien Mathieu 提交于
While it's interesting to have the results array, it can make a console or a webpage freeze if there are a lot of them. So this limits the number of records displayed in #inspect to 10 and tells how much were effectively found.
-
- 06 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
The reason for removing the previous implementation of `#inspect` was that it hid from you that you were dealing with a `Relation` rather than an `Array`. But it is still useful to be able to see the records, particularly if you're writing something like the following in tests: assert_equal [foo], Post.where(:bar) If the assertion fails, you want to see what records were actually loaded. So this implementation makes it clear that you've got a `Relation`, but also shows your records.
-
- 22 6月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 03 6月, 2012 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 01 6月, 2012 1 次提交
-
-
由 Akira Matsuda 提交于
now we can invoke previously added scope extension methods
-
- 21 5月, 2012 1 次提交
-
-
由 Ivan Kukobko 提交于
-
- 18 5月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 17 5月, 2012 1 次提交
-
-
由 Radoslav Stankov 提交于
Record.from("(#{sub_query.to_sql})") -> Record.from(sub_query) Record.from("(#{sub_query.to_sql}) a") -> Record.from(sub_query, :a)
-
- 11 5月, 2012 1 次提交
-
-
由 Andrew White 提交于
-
- 06 5月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Revert "Merge pull request #5494 from armstrjare/active_record_relation_keep_association_join_context_on_merge" This reverts commit dcd04e76, reversing changes made to 58a49875.
-
- 05 5月, 2012 1 次提交
-
-
由 Marcelo Silveira 提交于
-
- 04 5月, 2012 1 次提交
-
-
由 Jared Armstrong 提交于
-
- 30 4月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 27 4月, 2012 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 26 4月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 11 4月, 2012 1 次提交
-
-
由 Juanjo Bazán 提交于
So a NullRelation (Relation#none) is chainable with database methods.
-
- 04 4月, 2012 1 次提交
-
-
由 Benedikt Deicke 提交于
-
- 03 4月, 2012 1 次提交
-
-
由 Benedikt Deicke 提交于
The #relation method gets called in four places and the return value was instantly cloned in three of them. The only place that did not clone was ActiveRecord::Scoping::Default::ClassMethods#unscoped. This introduced a bug described in #5667 and should really clone the relation, too. This means all four places would clone the relation, so it doesn't make a lot of sense caching it in the first place. The four places with calls to relations are: activerecord/lib/active_record/scoping/default.rb:110:in `block in build_default_scope'" activerecord/lib/active_record/scoping/default.rb:42:in `unscoped'" activerecord/lib/active_record/scoping/named.rb:38:in `scoped'" activerecord/lib/active_record/scoping/named.rb:52:in `scope_attributes'"
-
- 30 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 18 3月, 2012 1 次提交
-
-
由 Ruben Davila 提交于
-
- 17 3月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 16 3月, 2012 2 次提交
-
-
由 Thiago Almeida 提交于
-
由 Thiago Almeida 提交于
-
- 14 3月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 12 3月, 2012 1 次提交
-
-
由 Andrew White 提交于
-
- 12 2月, 2012 1 次提交
-
-
由 Vishnu Atrai 提交于
-
- 11 2月, 2012 1 次提交
-
-
由 Karunakar (Ruby) 提交于
-