aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
Commit message (Collapse)AuthorAgeFilesLines
* adding a reader for loaded, initializing @loaded to falseAaron Patterson2010-07-201-6/+3
|
* enable AS::JSON.encode to encode AR::Relation by providing `as_json` methodMislav Marohnić2010-07-131-1/+3
| | | | | | [#5073 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fix ActiveRecord `destroy_all` so it returns destroyed recordsMislav Marohnić2010-07-081-2/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Tidy up deprecation message for with_exclusive_scope.José Valim2010-06-291-1/+1
|
* Add scoping and unscoped as the syntax to replace the old with_scope and ↵José Valim2010-06-291-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* blocks removed from all the ActiveRelation query_methods, extend method ↵Santiago Pastorino2010-06-261-0/+9
| | | | | | added instead Signed-off-by: José Valim <jose.valim@gmail.com>
* adding fix for to_xml for ActiveRecord relation objectNeeraj Singh2010-06-231-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveRecord's relation object should respond to to_json and to_yamlNeeraj Singh2010-06-231-1/+1
| | | | | | [#4547 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds basic description and title.Rizwan Reza2010-06-161-2/+6
|
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-1/+1
|
* ignore raw_sql_ table alias that is used by Oracle adapterRaimonds Simanovskis2010-06-041-1/+2
|
* downcase table names in aliased_table_name_for and ↵Raimonds Simanovskis2010-06-041-2/+4
| | | | references_eager_loaded_tables? methods (as Oracle quoted table names are in uppercase)
* Make Relation#inspect less noisyPratik Naik2010-04-021-0/+4
|
* Goodbye ActiveRecord::NamedScope::ScopePratik Naik2010-04-021-0/+11
|
* Oops :extends is not a MULTI_VALUE_METHODPratik Naik2010-04-021-1/+1
|
* Add Relation extensionsPratik Naik2010-04-021-2/+6
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+2
|
* From and lock should be defined to be consistent with other ivars. Limit and ↵Emilio Tagua2010-03-221-5/+2
| | | | | | | | offset are always defined, no need to test that. [#4253 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* cleaning up many more warnings in activerecord [#4180 state:resolved]Aaron Patterson2010-03-151-0/+3
| | | | Signed-off-by: wycats <wycats@gmail.com>
* cleaning up some test warningsAaron Patterson2010-03-141-0/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* removing spawn from SpawnMethodsAaron Patterson2010-03-101-0/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Move batch finders to RelationPratik Naik2010-02-121-1/+1
|
* Relation should respond to class methodsPratik Naik2010-01-221-1/+1
|
* Allow calling class methods on a RelationPratik Naik2010-01-221-0/+2
|
* Supplying Arel::SqlLiteral is much fasterPratik Naik2010-01-211-2/+5
|
* Use @limit_value and @offset_value instead of calling arelPratik Naik2010-01-201-1/+1
|
* Move update and update_all to RelationPratik Naik2010-01-201-0/+64
|
* Dont delegate Relation#update to arelPratik Naik2010-01-201-1/+1
|
* Delegate delete_all to RelationPratik Naik2010-01-201-2/+19
|
* Move destroy to RelationPratik Naik2010-01-201-0/+27
|
* Remove Base.delete as it's same as Relation#deletePratik Naik2010-01-201-0/+20
|
* Make Relation#destroy_all handle all the casesPratik Naik2010-01-201-3/+33
|
* Delegate all finders to RelationPratik Naik2010-01-201-2/+0
|
* Remove Relation#where_clausePratik Naik2010-01-191-5/+1
|
* Give preference to to_a over arel from Relation#method_missingPratik Naik2010-01-191-3/+4
|
* Rename CalculationMethods to Calculations and get rid of the old ↵Pratik Naik2010-01-191-1/+1
| | | | Calculations module
* Add Relation#construct_relation_for_association_calculations for ↵Pratik Naik2010-01-191-4/+7
| | | | calculations with includes
* Add Relation#find_with_associations to load relation with eager loaded ↵Pratik Naik2010-01-191-25/+4
| | | | associations
* Get rid of Relation#order_clausesPratik Naik2010-01-181-10/+6
|
* Inherit named scope class Scope from RelationPratik Naik2010-01-181-1/+3
|
* Ensure that Scope#proxy_scope is always klass. Rename proxy_scope to klass too.Pratik Naik2010-01-181-0/+2
|
* Make Relation#reload force load the records immediatelyPratik Naik2010-01-171-2/+3
|
* Remove AR#scope() methodPratik Naik2010-01-161-9/+9
|
* Make scopes use relations under the hoodPratik Naik2010-01-161-6/+9
|
* Delay building arel relation as long as possible for improved introspectionPratik Naik2010-01-121-37/+35
|
* Add Relation#create_with to explictily specify create scopePratik Naik2010-01-041-7/+9
|
* Ensure using proper engine for Arel::TablePratik Naik2010-01-041-1/+1
|
* Rename a variable name for consistencyPratik Naik2010-01-031-4/+4
|
* Move Relation#spawn and Relation#merge to a separate modulePratik Naik2010-01-031-46/+1
|
* Give preference to the second relation's order when mergingPratik Naik2010-01-031-3/+10
|