aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/finder_methods.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix for #371Nick Howard2011-05-081-1/+6
| | | | | | | | | | | | if a query contains a limit or an offset, ActiveRecord::FinderMethods#find_last had inconsistent behavior. If the records were loaded, it returned the last record in the cached list. If they were not, it reversed the order of the query and changed the limit to one. If the earlier limit was less than the total matching the query in the db, it would return a different record than if the records had been cached. This commit changes find_last so that it loads the records when getting the last record on a query containing a limit or an offset, which makes the behavior consistent.
* deprecated the use of the guard_protected_attributes argument with ↵Josh Kalderimis2011-04-251-2/+2
| | | | attributes= in AR in favor of assign_attributes(attrs, :without_protection => true)
* stop using distinct on for the unique id queries. [#6450 state:resolved]Aaron Patterson2011-04-211-0/+2
|
* use index based substitution for bind parametersAaron Patterson2011-04-131-1/+1
|
* stop using deprecated methods in arelAaron Patterson2011-04-111-2/+2
|
* Use IM when trying to load records using ID.Emilio Tagua2011-04-041-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Change exists? so that it doesn't instantiate records [#6127 state:resolved]Andrew White2011-03-291-4/+10
|
* removes unnecessary selfs, and mentions that first! and last! take no ↵Xavier Noria2011-03-261-4/+6
| | | | arguments in their API docs
* No arguments for first! and last!Pratik Naik2011-03-251-4/+4
|
* comment typo fixJosh Susser2011-03-251-2/+2
|
* add #first! and #last! to models & relationsJosh Susser2011-03-241-0/+10
|
* Move JoinDependency and friends from ↵Jon Leighton2011-02-281-2/+2
| | | | ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations
* keep options titles consistent to "Options"Gabriel Horner2011-02-031-1/+1
|
* use select_all because not all database adapters support bind valuesAaron Patterson2011-01-081-1/+1
|
* stop creating intermediate AR objects, just construct AR objects from a list ↵Aaron Patterson2011-01-071-1/+2
| | | | of hashes
* Explicitly select * from has_and_belongs_to_many association tables, ↵Raimonds Simanovskis2011-01-041-1/+1
| | | | | simplify exists? query Previous version (after commit 3103296a61709e808aa89c3d37cf22bcdbc5a675) was generating wrong SQL for Oracle when calling exists? method on HABTM association.
* ActiveRecord::Relation#primary_key should return a string, just like ↵Jon Leighton2011-01-031-9/+9
| | | | ActiveRecord::Base.primary_key does.
* taking advantage of the JoinSource node in the SQL ASTAaron Patterson2010-12-161-1/+1
|
* passing the ast to JoinDependencyAaron Patterson2010-12-071-1/+1
|
* use the columns hash for primary key lookupAaron Patterson2010-12-031-1/+1
|
* reduce method calls on arelAaron Patterson2010-11-301-1/+1
|
* use ARel rather than generate SQL stringsAaron Patterson2010-11-241-1/+1
|
* moving column_aliases to JoinDependencyAaron Patterson2010-11-241-10/+1
|
* Finder gives a little bit more info on the lookup column (primary key)Franck Verrot2010-11-131-1/+1
|
* stop recursively calling exists?Aaron Patterson2010-11-051-3/+5
|
* Fixes queries using limits and punctuation in order, removes order("col1, ↵Santiago Pastorino2010-11-051-1/+1
| | | | | | col2") usage in favor of order(["col1", "col2"}) [#4597 state:committed]
* find_one uses prepared statement cacheAaron Patterson2010-10-261-1/+6
|
* Renaming and formatting changes in JoinDependencyJon Leighton2010-10-131-2/+5
|
* stop using deprecated arel APIAaron Patterson2010-10-121-2/+2
|
* converting an inject to a map + Hash[]Aaron Patterson2010-09-101-1/+1
|
* Use new finders syntax in docs.Emilio Tagua2010-09-011-16/+16
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-7/+7
| | | | 's/[ \t]*$//' -i {} \;)
* Removing most of the symbol to proc usage in Active RecordPrem Sichanugrist2010-08-131-1/+1
| | | | This will hopefully make Active Record run a bit more faster.
* stop using private methodsAaron Patterson2010-08-111-2/+2
|
* do not pass AR objects to ARelAaron Patterson2010-08-041-0/+2
|
* avoid passing AR::Base objects to Arel when we canAaron Patterson2010-08-031-0/+2
|
* ensuring that description does not exceed 100 columnsNeeraj Singh2010-08-021-9/+14
|
* Fix the #using_limitable_reflections? helper to work correctly by not ↵Ken Collins2010-07-081-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>
* Remove block definitions in finder methods.Emilio Tagua2010-06-241-4/+4
|
* Here the intention was to assign to different objectsSantiago Pastorino2010-05-081-1/+1
|
* Make find_or_create and find_or_initialize work mixing explicit parameters ↵Santiago Pastorino2010-05-071-9/+13
| | | | | | and a hash [#4457 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix eager loading of associations causing table name collisionsErnie Miller2010-04-281-1/+0
| | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Some require indifferent_access addedSantiago Pastorino2010-04-211-0/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* Make Relation#first and Relation#last behave like named scope'sPratik Naik2010-04-021-2/+18
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+2
|
* Move methods from association to relation finder methods.Emilio Tagua2010-03-251-2/+11
|
* Use @limit_value and @offset_value instead of calling arelPratik Naik2010-01-201-4/+4
|
* Delegate exists? to RelationPratik Naik2010-01-201-3/+33
|
* Delegate all finders to RelationPratik Naik2010-01-201-29/+147
|
* Remove Relation#where_clausePratik Naik2010-01-191-2/+2
|