- 10 5月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
-
- 01 5月, 2013 1 次提交
-
-
由 Noemj 提交于
-
- 30 4月, 2013 1 次提交
-
-
由 Noemj 提交于
-
- 03 4月, 2013 1 次提交
-
-
由 James Golick 提交于
-
- 02 4月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
deprecated Fixes activerecord-deprecated_finders build. https://travis-ci.org/rails/activerecord-deprecated_finders/builds/5964703
-
- 28 3月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 27 3月, 2013 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
-
- 15 3月, 2013 2 次提交
-
-
由 Yves Senn 提交于
Closes #9712.
-
由 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`.
-
- 05 3月, 2013 1 次提交
-
-
由 kennyj 提交于
-
- 04 3月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 25 2月, 2013 1 次提交
-
-
由 Yves Senn 提交于
We discussed that the auto explain feature is rarely used. This PR removes only the automatic explain. You can still display the explain output for any given relation using `ActiveRecord::Relation#explain`. As a side-effect this should also fix the connection problem during asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie` forced a connection.
-
- 19 1月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
* User class instead of Users. * #where_values_hash does not change the value to downcase as the example was showing. [ci skip]
-
- 12 1月, 2013 1 次提交
-
-
由 Derek Kraan 提交于
in a default_scope. `Model.joins(...).where(condition_on_joined_table).update_all` / `delete_all` worked, but the same operation implemented with a default_scope generated a SQL error because ActiveRecord ignored the join but implemented the where condition anyways.
-
- 04 1月, 2013 1 次提交
-
-
- 29 11月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
-
- 24 11月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 10 11月, 2012 1 次提交
-
-
由 AvnerCohen 提交于
-
- 23 10月, 2012 1 次提交
-
-
由 AvnerCohen 提交于
Another batch of hash syntax changes to comment, this time around, I tried to keep 'output' messages untouched.
-
- 19 10月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This is similar to #first_or_create, but slightly different and a nicer API. See the CHANGELOG/docs in the commit. Fixes #7853
-
- 16 10月, 2012 1 次提交
-
-
- 17 9月, 2012 1 次提交
-
-
由 Guillermo Iguaran 提交于
-
- 15 8月, 2012 1 次提交
-
-
由 Roman Shatsov 提交于
-
- 03 8月, 2012 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
- 02 8月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
This doesn't change the exernal behavior, but it moves some code around to where I think it properly belongs.
-
由 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
-
- 22 7月, 2012 1 次提交
-
-
由 Vijay Dev 提交于
-
- 20 7月, 2012 1 次提交
-
-
由 Oscar Del Ben 提交于
-
- 18 7月, 2012 2 次提交
-
-
由 Oscar Del Ben 提交于
-
由 Oscar Del Ben 提交于
-
- 17 7月, 2012 2 次提交
-
-
由 Oscar Del Ben 提交于
-
由 Oscar Del Ben 提交于
-
- 07 7月, 2012 4 次提交
-
-
由 Jon Leighton 提交于
A test was failing due to the way that Relation#inspect causes association proxies to ignore unsaved records added to the association. This is fixed by simply calling to_a and letting to_a figure out how to get the records (which, in the case of associations, takes into account new records). I think it is acceptable to do this rather than limiting the query at the database level: * It's what we've done in all released Rails versions up to this point * The goal of the limit is to not flood the console with output - this is the problem we're targeting, rather than the actual loading of the records from the database * You probably want to do something with those records later anyway, otherwise you wouldn't have built a relation for them.
-
由 Jon Leighton 提交于
-
由 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.
-
- 30 6月, 2012 1 次提交
-
-
由 Brian Cardarella 提交于
-