Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | save another array allocation | Aaron Patterson | 2013-07-15 | 1 | -1/+1 |
| | |||||
* | removing useless assingment | Aaron Patterson | 2013-07-15 | 1 | -1/+1 |
| | |||||
* | reorder bind parameters when merging relations | Aaron Patterson | 2013-07-15 | 1 | -2/+18 |
| | |||||
* | use arel rather than slapping together SQL strings | Aaron Patterson | 2013-07-15 | 1 | -2/+4 |
| | |||||
* | Merge pull request #11439 from ernie/only-scan-strings-for-nodes | Yves Senn | 2013-07-14 | 1 | -1/+1 |
|\ | | | | | Blacklist->whitelist for reference scans in order! | ||||
| * | Blacklist->whitelist for reference scans in order! | Ernie Miller | 2013-07-14 | 1 | -1/+1 |
| | | | | | | | | | | | | Stop special-casing Arel::Nodes as exempt from reference scanning in order. Instead, only scan order values that are strings for a table reference. | ||||
* | | re-introduce `select_for_count` private method. | Yves Senn | 2013-07-14 | 1 | -5/+10 |
|/ | | | | See https://github.com/rails/rails/commit/da9b5d4a8435b744fcf278fffd6d7f1e36d4a4f2#commitcomment-3630064 for discussion. | ||||
* | Typo fix [skip ci] | Ankit Gupta | 2013-07-12 | 1 | -1/+1 |
| | |||||
* | fix visibility of the relation construction methods | Aaron Patterson | 2013-07-09 | 1 | -5/+7 |
| | |||||
* | pass arel to select_all rather than depend on method_missing | Aaron Patterson | 2013-07-09 | 1 | -1/+1 |
| | |||||
* | Extract common query to a constant. | Vipul A M | 2013-07-06 | 1 | -1/+3 |
| | | | | Perf ref: https://gist.github.com/vipulnsward/8209749201dfdd678c97 | ||||
* | no need to to_sym the column name, leave it as-is | Aaron Patterson | 2013-07-02 | 1 | -1/+1 |
| | |||||
* | resolve aliases before passing the hash to the predicate builder | Aaron Patterson | 2013-07-02 | 2 | -4/+11 |
| | |||||
* | avoid intermediate zipped array | Aaron Patterson | 2013-07-01 | 1 | -3/+2 |
| | |||||
* | make the identity type a singleton to save on object creation | Aaron Patterson | 2013-07-01 | 1 | -3/+1 |
| | |||||
* | only deal with strings internally | Aaron Patterson | 2013-07-01 | 1 | -3/+3 |
| | |||||
* | build an AST rather than slapping strings together | Aaron Patterson | 2013-07-01 | 1 | -11/+7 |
| | |||||
* | stop exposing the underlying alias datastructure | Aaron Patterson | 2013-07-01 | 1 | -4/+4 |
| | |||||
* | we don't need to to_s the column | Aaron Patterson | 2013-07-01 | 1 | -1/+1 |
| | |||||
* | the data structure used to store attribute aliases should not be exposed | Aaron Patterson | 2013-07-01 | 1 | -2/+2 |
| | |||||
* | Remove deprecated `:distinct` option from `Relation#count`. | Yves Senn | 2013-07-01 | 1 | -5/+0 |
| | |||||
* | Merge pull request #11161 from dmitry/find_in_batches_works_without_logger | Carlos Antonio da Silva | 2013-06-28 | 1 | -2/+2 |
|\ | | | | | | | | | ActiveRecord find_in_batches should work without logger When I set logger to nil both methods from Batches module find_in_batches or find_each should work anyway. | ||||
| * | find_in_batches should work without logger | Dmitry Polushkin | 2013-06-28 | 1 | -2/+2 |
| | | |||||
* | | Remove order_values argument now that default_scope is simplified | Carlos Antonio da Silva | 2013-06-28 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | | | | In 94924dc32baf78f13e289172534c2e71c9c8cade the internal default_scope implementation has changed making it simpler to follow, meaning that the old usage of with_default_scope has been removed. With that, order_values was the same argument for both calls to find_first_with_limit, so remove it and use the existent attribute for the sake of clarity/simplification. | ||||
* | | Simplify/fix implementation of default scopes | Jon Leighton | 2013-06-28 | 5 | -17/+5 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Merge pull request #10992 from Empact/find-each-enumerator | Carlos Antonio da Silva | 2013-06-25 | 1 | -2/+13 |
|\ \ | | | | | | | | | | When .find_each is called without a block, return an Enumerator. | ||||
| * | | When .find_each is called without a block, return an Enumerator. | Ben Woosley | 2013-06-19 | 1 | -2/+13 |
| |/ | | | | | | | This lets us do things like call: .find_each.with_index | ||||
* / | flatten merged join_values before building the joins | Neeraj Singh | 2013-06-22 | 1 | -1/+1 |
|/ | | | | | | | | fixes #10669 While joining_values special treatment is given to string values. By flattening the array it ensures that string values are detected as strings and not arrays. | ||||
* | Merge pull request #10898 from dmitry/find_first_refactor_duplication | Rafael Mendonça França | 2013-06-14 | 1 | -11/+10 |
|\ | | | | | Refactored ActiveRecord `first` method to get rid of duplication. | ||||
| * | rename method `find_first_records` to `find_first_with_limit` | Dmitry Polushkin | 2013-06-10 | 1 | -3/+3 |
| | | |||||
| * | Refactored ActiveRecord `first` method to get rid of duplication. | Dmitry Polushkin | 2013-06-09 | 1 | -11/+10 |
| | | |||||
* | | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2013-06-14 | 2 | -22/+85 |
|\ \ | | | | | | | | | | | | | Conflicts: guides/source/upgrading_ruby_on_rails.md | ||||
| * | | copy edits [ci skip] | Vijay Dev | 2013-06-14 | 1 | -19/+15 |
| | | | |||||
| * | | doc: renaming table name to follow the file's standards | Thiago Pinto | 2013-06-08 | 1 | -2/+2 |
| | | | |||||
| * | | instructions for variations and alternatives for ActiveRecord#find | Thiago Pinto | 2013-06-08 | 1 | -1/+35 |
| | | | |||||
| * | | explaining ActiveRecord#first in rails 3 and 4 | Thiago Pinto | 2013-06-08 | 1 | -0/+13 |
| | | | |||||
| * | | lists the options for find_each and find_in_batches | Thiago Pinto | 2013-06-07 | 1 | -17/+37 |
| | | | |||||
| * | | using Model.all.find_each in rails 3 raises an error and should not be ↵ | Thiago Pinto | 2013-06-07 | 1 | -2/+2 |
| | | | | | | | | | | | | recommended | ||||
* | | | we should apply the default scope before querying | Aaron Patterson | 2013-06-12 | 1 | -1/+2 |
| | | | |||||
* | | | Remove fall back and column restrictions for `count`. | Yves Senn | 2013-06-09 | 1 | -10/+6 |
| | | | |||||
* | | | Merge pull request #10561 from Empact/nix-throwresult | Jon Leighton | 2013-06-07 | 2 | -15/+15 |
|\ \ \ | | | | | | | | | Rather than raising ThrowResult when construct_limited_ids_conditions comes up empty, set the relation to NullRelation and rely on its results. | ||||
| * | | | Rather than raising ThrowResult when construct_limited_ids_conditions comes ↵ | Ben Woosley | 2013-05-10 | 2 | -17/+15 |
| | | | | | | | | | | | | | | | | | | | | | | | | up empty, set the relation to NullRelation and rely on its results. This will help avoid errors like 2fcafee250ee2, because in most cases NullRelation will do the right thing. Minor bonus is avoiding the use of exceptions for flow control. | ||||
| * | | | Fix that #pluck wasn't rescuing ThrowResult, meaning it would blow up when ↵ | Ben Woosley | 2013-05-10 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | failing to construct_limited_ids_condition. | ||||
* | | | | Remove #sum with a block was deprecated. | kennyj | 2013-06-01 | 1 | -9/+1 |
| | | | | |||||
* | | | | Merge pull request #10767 from jmondo/master | Carlos Antonio da Silva | 2013-05-29 | 1 | -1/+1 |
|\ \ \ \ | | | | | | | | | | | Use grep instead of select with === in QueryMethods | ||||
| * | | | | use grep over select for consistency and efficiency | John Gesimondo | 2013-05-28 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | pass block directly to grep | ||||
* | | | | | `implicit_readonly` is being removed in favor of calling `readonly` explicitly | Yves Senn | 2013-05-27 | 1 | -5/+0 |
|/ / / / | |||||
* | | | | avoid creating a set if no where values are removed | Aaron Patterson | 2013-05-21 | 1 | -0/+2 |
| | | | | |||||
* | | | | remove bind values for where clauses that were removed | Aaron Patterson | 2013-05-21 | 1 | -9/+8 |
| | | | | |||||
* | | | | push partitioning up so bind elimination can get the removed wheres | Aaron Patterson | 2013-05-21 | 1 | -5/+3 |
| | | | |