aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
Commit message (Collapse)AuthorAgeFilesLines
* in regexps, the dot in a character class is not a metacharacterXavier Noria2010-10-151-1/+1
|
* where_values_hash always returns a hashAaron Patterson2010-09-281-1/+1
|
* Set attributes properly for model built from association with conditions ↵Marcelo Giorgi2010-09-281-1/+5
| | | | | | [#5562 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* @klass also uses DynamicFinderMatch, so no need for it on the relationAaron Patterson2010-09-271-9/+0
|
* fixed some issues with JSON encodingJakub Suder2010-09-071-1/+3
| | | | | | | | | | | - as_json in ActiveModel should return a hash and handle :only/:except/:methods options - Array and Hash should call as_json on their elements - json methods should not modify options argument [#5374 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Improved indentationPratik Naik2010-09-061-7/+3
|
* we should mark strings as SQL Literal valuesAaron Patterson2010-08-231-1/+1
|
* While creating a new record using has_many create method default scope of ↵Neeraj Singh2010-08-191-4/+7
| | | | | | | | | | | child should be respected. author.posts.create should take into account default_scope defined on post. [#3939: state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-4/+4
| | | | 's/[ \t]*$//' -i {} \;)
* Removing most of the symbol to proc usage in Active RecordPrem Sichanugrist2010-08-131-2/+2
| | | | This will hopefully make Active Record run a bit more faster.
* do not rely on arel class structureAaron Patterson2010-08-061-1/+3
|
* updating documentation to ensure line does not exceed 100 columnsNeeraj Singh2010-08-021-6/+8
|
* reducing function calls and using faster methods for testingAaron Patterson2010-07-301-7/+7
|
* edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-301-1/+1
|
* 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