aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/finder_methods.rb
Commit message (Collapse)AuthorAgeFilesLines
* extract deprecated code for #find, #first, #last, #allJon Leighton2012-04-131-105/+36
|
* use a hash to store relation valuesJon Leighton2012-04-131-7/+7
|
* mention that coercion only happens when the primary key is an integer and ↵Reg Braithwaite2012-04-121-2/+2
| | | | use +to_i+ formatting
* Documents that ActiveRecord's find by id uses to_i to coerce its arguments ↵Reg Braithwaite2012-04-121-1/+3
| | | | to integers
* Add Relation#find_by and Relation#find_by!Jon Leighton2012-03-301-0/+19
|
* Remove 'needless boolean casting'.Jack Chen (chendo)2012-03-261-1/+1
| | | | | "Predicates in Rails rely on standard Ruby semantics for boolean values and guarantee no singletons whatsoever." - @fxn
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-10/+0
|
* Add dynamic find_or_create_by_{attribute}! method.Andrew White2012-03-121-1/+1
|
* use bind values for join columnsAaron Patterson2012-02-271-2/+2
|
* prepared statements can be disabledAaron Patterson2012-02-211-1/+1
|
* Revert "Merge pull request #4746 from jenslukowski/issue4718"Aaron Patterson2012-01-311-8/+1
| | | | | This reverts commit 5cad7a0dba652f3e942e58087bc88ba5c5390edc, reversing changes made to bb842e8d2111e50b21a14b8bd6d89371a4b9cd68.
* fix for Issue 4718Jens Lukowski2012-01-291-1/+8
|
* correctly handle order calls after a reorderMatt Jones + Scott Walker2012-01-031-2/+2
|
* allow reorder to affect eager loading correctlyMatt Jones + Scott Walker2011-12-281-1/+1
|
* Fix #exists? for AR::ModelJon Leighton2011-12-241-1/+1
|
* exclude ORDER BY clause when querying Relation#exists?Akira Matsuda2011-11-091-1/+1
|
* Merge pull request #2485 from akaspick/exists_fixJon Leighton2011-09-071-1/+3
|\ | | | | fix exists? to return false if passed nil (which may come from a missing
| * fix exists? to return false if passed nil (which may come from a missing URL ↵Andrew Kaspick2011-08-101-1/+3
| | | | | | | | param)
* | Use LIMIT sql word in last when it's possibleDamien Mathieu2011-09-051-1/+5
| |
* | use LIMIT SQL word in first - Closes #2783Damien Mathieu2011-09-051-1/+1
|/
* Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-081-3/+3
| | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now.
* avoid Symbol#to_procVijay Dev2011-07-201-1/+1
|
* ActiveRecord: Fix eager loading so that giving a blank order clause ↵Elliot Winkler2011-07-181-1/+1
| | | | generates valid SQL
* Merge pull request #1823 from gnarg/masterSantiago Pastorino2011-07-101-2/+2
|\ | | | | Log instrumentation name for exists? queries
| * Log instrumentation name for exists? queriesJon Guymon2011-06-221-2/+2
| |
* | Merge pull request #1273 from jeremyf/feature-association-proxy-sendSantiago Pastorino2011-07-061-0/+1
|\ \ | |/ |/| Addresses an inconsistency in the ActiveRecord::Base.method_missing handl
| * Addresses an inconsistency in the ActiveRecord::Base.method_missing handling ↵Jeremy Friesen2011-05-241-0/+1
| | | | | | | | of dynamic finder methods and the passing of the &block parameter for :find_by_attributes.
* | Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-05-251-1/+1
|\ \ | |/ |/| | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb
| * Remove extra white spaces on ActiveRecord docs.Sebastian Martinez2011-05-231-1/+1
| |
* | Add support for passing mass assignment roles to dynamic finders. Closes #1170.Andrew White2011-05-211-2/+2
| |
* | Syntax cleanup: for in => eachGuillermo Iguaran2011-05-191-1/+1
|/
* 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
|