aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
Commit message (Collapse)AuthorAgeFilesLines
* supporting nil when passed in as an IN clauseAaron Patterson2011-04-291-1/+12
|
* 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
|
* Evaluate default scopes at the last possible moment in order to avoid ↵Jon Leighton2011-04-122-4/+14
| | | | problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
* 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>
* Merge branch 'master' into zomgAaron Patterson2011-03-293-11/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (51 commits) order is not guaranteed by this select, so add an order and call first! oracle stores this with microseconds, so convert to seconds before comparing make sure that active connections are not cleared during test when an exception happens clearing active connections in the ConnectionManagement middleware if an exception happens proxy body responses so we close database connections after body is flushed Pass the proper method_name instead of hardcoding to action_name. Quote find_in_batches ORDER BY clause [#6620 state:resolved] Delegate first!, last!, any? and many? to scoped Dont call authenticate_or_request_with_http_basic twice Remove 'warning: ambiguous first argument' when running ActionPack tests Change exists? so that it doesn't instantiate records [#6127 state:resolved] Move mapper_test to the appropriate location Update the wildcard route to be non-greedy by default, therefore be able to match the (.:format) segment [#6605 state:resolved] Fix examples Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH] make sure we have an active database connection before running each connection management test adding active_connections? to the connection pool for finding open connections adding active_connection? to the connection pool testing app delegation from the ConnectionManagement middleware namespacing connection management tests. :heart: ...
| * Quote find_in_batches ORDER BY clause [#6620 state:resolved]Andrew White2011-03-291-1/+1
| |
| * Change exists? so that it doesn't instantiate records [#6127 state:resolved]Andrew White2011-03-291-4/+10
| |
| * Bring #reorder backSebastian Martinez2011-03-281-0/+4
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * 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
| |
* | Use Arel to build subquery. Adapt tests to changed fixtures.John Mileham2011-03-241-13/+12
| |
* | Merge branch 'master' of github.com:rails/rails into count_behaviorJohn Mileham2011-03-244-3/+19
|\|
| * add #first! and #last! to models & relationsJosh Susser2011-03-241-0/+10
| |
| * Merge branch 'master' into fuuuAaron Patterson2011-03-221-0/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Do not show optional (.:format) block for wildcard route [#6605 state:resolved] pushing id insertion and prefetch primary keys down to Relation#insert use prepared statements to fetch the last insert id escaping binary data encoding when inserting to sqlite3. Thanks Naruse! [#6559 state:resolved] schemas set by set_table_name are respected by the mysql adapter. [#5322 state:resolved] Reapply extensions when using except and only SJIS is an alias to Windows-31J in ruby trunk. Use SHIFT_JIS for this test Improved resolver docs a bit [action_view] docs for FileSystemResolver [action_view] added custom patterns to template resolver
| | * Reapply extensions when using except and onlyIain Hecker2011-03-211-0/+6
| | |
| * | Resolve some TODO comments which I decided did not need anything doneJon Leighton2011-03-121-1/+0
| | |
| * | Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-051-2/+2
| |\| | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG
| | * use Arel::Table#alias rather than passing the :as parameterAaron Patterson2011-03-051-2/+2
| | |
| * | Merge branch 'master' into nested_has_many_throughJon Leighton2011-03-046-74/+104
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb
| * | remove lasgn since AST is mutatedAaron Patterson2010-12-101-1/+1
| | |
| * | just mutate the ast, fewer lasgnsAaron Patterson2010-12-101-3/+2
| | |
* | | Change behavior of count(:limit => x, :offset => y) to limit/offset before ↵John Mileham2011-03-031-14/+26
| |/ |/| | | | | counting.
* | Move JoinDependency and friends from ↵Jon Leighton2011-02-282-4/+4
| | | | | | | | ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations
* | use an attribute rather than a SQL literalAaron Patterson2011-02-261-1/+1
| |
* | removing limits and offsets from COUNT queries unless both are specified. ↵Aaron Patterson2011-02-251-1/+13
| | | | | | | | [#6268 state:resolved]
* | merges docrailsXavier Noria2011-02-181-1/+1
|\ \
| * | Fix Typos: remove several occurences of the theNicholas Rowe2011-02-171-1/+1
| | |
* | | Split AssociationProxy into an Association class (and subclasses) which ↵Jon Leighton2011-02-181-1/+1
| | | | | | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
* | | explicitly allowing lolqueriesAaron Patterson2011-02-161-10/+1
| | |
* | | use the arel table rather than generating stringsAaron Patterson2011-02-161-1/+1
| | |
* | | no need for Array.wrapAaron Patterson2011-02-161-1/+1
| | |
* | | removed an unnecessary second query when passing an ActiveRecord::Relation ↵Steven Fenigstein2011-02-161-1/+4
| | | | | | | | | | | | to a where clause. And added ability to use subselects in where clauses.
* | | Remove Relation#& alias for Relation#mergeErnie Miller2011-02-121-2/+0
| | |
* | | limit() should sanitize limit valuesAaron Patterson2011-02-081-1/+1
|/ / | | | | | | This fixes CVE-2011-0448
* | Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-02-051-1/+1
|\ \
| * | keep options titles consistent to "Options"Gabriel Horner2011-02-031-1/+1
| | |
* | | The type_cast_calculated_value method will trust DB types before casting to ↵Ken Collins2011-02-031-1/+1
|/ / | | | | | | | | | | | | | | a BigDecimal. [#6365 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* | Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-01-201-0/+14
|\ \
| * | document ActiveRecord's except and onlyJordi Romero2011-01-151-0/+14
| | | | | | | | | | | | Document methods that allow easily override arel queries
* | | Always return decimal average of integer fieldsRaimonds Simanovskis2011-01-101-9/+5
| | | | | | | | | | | | In previous version if database adapter (e.g. SQLite and Oracle) returned non-String calculated values then type_cast_using_column converted decimal average value of intefer field to integer value. Now operation parameter is always checked to decide which conversion of calculated value should be done.
* | | 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-034-14/+14
| | | | | | | | | | | | ActiveRecord::Base.primary_key does.
* | | Make Relation#create_with always merge rather than overwrite, not just when ↵Jon Leighton2011-01-032-4/+2
| | | | | | | | | | | | merging two relations. If you wish to overwrite, you can do relation.create_with(nil), or for a specific attribute, relation.create_with(:attr => nil).
* | | Let AssociationCollection#find use #scoped to do its finding. Note that I am ↵Jon Leighton2011-01-031-1/+1
| | | | | | | | | | | | removing test_polymorphic_has_many_going_through_join_model_with_disabled_include, since this specifies different behaviour for an association than for a regular scope. It seems reasonable to expect scopes and association proxies to behave in roughly the same way rather than having subtle differences.