Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | got the ternary backwards. somehow the sqlite tests passed! | Aaron Patterson | 2010-07-29 | 1 | -1/+1 |
| | |||||
* | PERF: avoiding splat args and reducing function calls | Aaron Patterson | 2010-07-29 | 1 | -8/+5 |
| | |||||
* | Shouldn't have committed this! Revert "avoid calling to_sql twice" | Aaron Patterson | 2010-07-28 | 1 | -7/+4 |
| | | | | This reverts commit 1c030a3c3c61d6d6262785bf67e1d8f44da87ea5. | ||||
* | avoid calling to_sql twice | Aaron Patterson | 2010-07-28 | 1 | -4/+7 |
| | |||||
* | Revert "Style fixes" | Pratik Naik | 2010-07-15 | 1 | -20/+20 |
| | | | | This reverts commit 3c300b31219f2af3ecd46ef22b04e5c5548db899. | ||||
* | Style fixes | wycats | 2010-07-14 | 1 | -20/+20 |
| | |||||
* | Style fixes | Pratik Naik | 2010-07-14 | 1 | -20/+20 |
| | |||||
* | Fix the #using_limitable_reflections? helper to work correctly by not ↵ | Ken Collins | 2010-07-08 | 1 | -1/+1 |
| | | | | | | examining the length of an array which contains false/true, hence always passing. [#4869 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | No need to check if the attribute exists (this is the same behavior as in ↵ | José Valim | 2010-06-29 | 1 | -3/+1 |
| | | | | 2.3) [#4994 state:resolved] and [#5003 state:resolved] | ||||
* | array subtraction should be faster than iterating over all the elements | Neeraj Singh | 2010-06-29 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Add scoping and unscoped as the syntax to replace the old with_scope and ↵ | José Valim | 2010-06-29 | 1 | -2/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with_exclusive_scope. A few examples: * with_scope now should be scoping: Before: Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end After: Comment.where(:post_id => 1).scoping do Comment.first #=> SELECT * FROM comments WHERE post_id = 1 end * with_exclusive_scope now should be unscoped: class Post < ActiveRecord::Base default_scope :published => true end Post.all #=> SELECT * FROM posts WHERE published = true Before: Post.with_exclusive_scope do Post.all #=> SELECT * FROM posts end After: Post.unscoped do Post.all #=> SELECT * FROM posts end Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values: Post.unscoped.all #=> SELECT * FROM posts | ||||
* | Remove unneeded reject | Santiago Pastorino | 2010-06-28 | 1 | -8/+1 |
| | |||||
* | Refactor: metaprogramming here it's confusing and make use of tap | Santiago Pastorino | 2010-06-26 | 1 | -64/+73 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Removes useless flatten | Santiago Pastorino | 2010-06-26 | 1 | -4/+9 |
| | |||||
* | Create a little bit less objects in ARel. | José Valim | 2010-06-26 | 1 | -6/+9 |
| | |||||
* | blocks removed from all the ActiveRelation query_methods, extend method ↵ | Santiago Pastorino | 2010-06-26 | 1 | -8/+4 |
| | | | | | | added instead Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | reorder method added to ActiveRelation | Santiago Pastorino | 2010-06-26 | 1 | -0/+8 |
| | | | | | | [#4972 state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Support for multiple selects added | Neeraj Singh and Santiago Pastorino | 2010-06-25 | 1 | -4/+7 |
| | | | | [#4841 state:committed] | ||||
* | Makes a build_select for the select part of build_arel | Santiago Pastorino | 2010-06-25 | 1 | -10/+13 |
| | |||||
* | Metaprogramming not needed here | Santiago Pastorino | 2010-06-25 | 1 | -11/+9 |
| | |||||
* | Only yield block if given. | Emilio Tagua | 2010-06-24 | 1 | -2/+2 |
| | |||||
* | Remove block definitions in finder methods. | Emilio Tagua | 2010-06-24 | 1 | -4/+4 |
| | |||||
* | Fix small bug where ActiveRecord::PredicateBuilder#build_from_hash didn't ↵ | James Harton | 2010-06-22 | 1 | -1/+1 |
| | | | | | | test for Arel::Relation as right hand value. [#4917 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Fix order method to accept relation attributes. | Emilio Tagua | 2010-06-22 | 1 | -1/+1 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Don't waste time building relations if there are no values presents. [#4860 ↵ | Emilio Tagua | 2010-06-21 | 1 | -4/+4 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Refactor build_arel: move joins out and simplify havings. [#4860 state:resolved] | Emilio Tagua | 2010-06-20 | 1 | -46/+46 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Special treatement for Relation#select { with block } | Pratik Naik | 2010-06-02 | 1 | -1/+14 |
| | |||||
* | To allow proper fisting of stack trace | Santiago Pastorino | 2010-05-14 | 1 | -3/+3 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | revises the rdoc of #average according to 5f3bd55, and realigns when clauses | Xavier Noria | 2010-05-12 | 1 | -5/+4 |
| | |||||
* | type_cast_calculated_value refactor: value is never a Fixnum here. Fix test ↵ | Santiago Pastorino | 2010-05-11 | 1 | -1/+1 |
| | | | | | | | | since SQLite returns Float. [#4514 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Improve code from 231d7676f72947bae765b9bd885b134aaf949921 | Pratik Naik | 2010-05-09 | 1 | -7/+5 |
| | |||||
* | corrected AR find_each and find_in_batches to raise when the user uses ↵ | Josh Kalderimis | 2010-05-09 | 1 | -1/+8 |
| | | | | | | select but does not specify the primary key Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Here the intention was to assign to different objects | Santiago Pastorino | 2010-05-08 | 1 | -1/+1 |
| | |||||
* | Make find_or_create and find_or_initialize work mixing explicit parameters ↵ | Santiago Pastorino | 2010-05-07 | 1 | -9/+13 |
| | | | | | | and a hash [#4457 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix unintuitive behavior with multiple order and group clauses | Ernie Miller | 2010-05-06 | 3 | -8/+9 |
| | | | | | | [#4545 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Allow pre-casted values (other than nil) to pass through from calculations ↵ | Brian Lopez | 2010-05-04 | 1 | -5/+9 |
| | | | | | | | | un-touched [#4514 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix eager loading of associations causing table name collisions | Ernie Miller | 2010-04-28 | 2 | -32/+42 |
| | | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Some require indifferent_access added | Santiago Pastorino | 2010-04-21 | 1 | -0/+1 |
| | | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)> | ||||
* | Build PredicateBuilder object only when needed | Pratik Naik | 2010-04-21 | 1 | -3/+1 |
| | |||||
* | Fix evals missing context | Jeremy Kemper | 2010-04-10 | 1 | -3/+3 |
| | |||||
* | Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...) | Jeremy Kemper | 2010-04-10 | 1 | -1/+2 |
| | |||||
* | Raise a StatementInvalid error when trying to build a condition with hash ↵ | Carl Lerche | 2010-04-03 | 1 | -1/+3 |
| | | | | keys that do not correspond to columns. | ||||
* | Goodbye ActiveRecord::NamedScope::Scope | Pratik Naik | 2010-04-02 | 1 | -1/+1 |
| | |||||
* | Make Relation#first and Relation#last behave like named scope's | Pratik Naik | 2010-04-02 | 1 | -2/+18 |
| | |||||
* | Add Relation extensions | Pratik Naik | 2010-04-02 | 2 | -8/+28 |
| | |||||
* | Consistency when using Relation constants | Pratik Naik | 2010-04-02 | 1 | -2/+2 |
| | |||||
* | Arel now handles ranges with excluded end. | Emilio Tagua | 2010-03-29 | 1 | -6/+1 |
| | |||||
* | Warn scoped order and limit are ignored. [#4123 state:resolved] | Emilio Tagua | 2010-03-29 | 1 | -1/+5 |
| | |||||
* | adds missing requires for Object#blank? and Object#present? | Xavier Noria | 2010-03-28 | 5 | -0/+10 |
| | |||||
* | Move methods from association to relation finder methods. | Emilio Tagua | 2010-03-25 | 1 | -2/+11 |
| |