aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation.rb
Commit message (Collapse)AuthorAgeFilesLines
* primary keys should not be cleared on cache clear, fixing oracle testsAaron Patterson2011-02-081-1/+8
|
* ActiveRecord::Relation#primary_key should return a string, just like ↵Jon Leighton2011-01-031-13/+6
| | | | ActiveRecord::Base.primary_key does.
* use the sql literal factory methodAaron Patterson2010-12-241-1/+1
|
* stop the recursive insanityAaron Patterson2010-12-241-5/+10
|
* setting the primary key on the update managerAaron Patterson2010-12-241-0/+1
|
* fixed retrieval of primary key value in Ralation#insert methodRaimonds Simanovskis2010-12-231-1/+1
| | | | previously primary key value was always assigned nil which caused Oracle enhanced adapter failing tests
* stop delegating inserts to ARel, use the INSERT SQL ourselvesAaron Patterson2010-12-161-1/+13
|
* avoid deprecate apiAaron Patterson2010-12-021-1/+8
|
* removing more calls to deprecated methodsAaron Patterson2010-12-021-1/+2
|
* just call join_sql against the manager objectAaron Patterson2010-11-301-1/+1
|
* we already know it is already an array, so we do not need to make really ↵Aaron Patterson2010-11-301-1/+1
| | | | really sure it is an array
* shorten up scope_for_createAaron Patterson2010-11-301-7/+1
|
* Ruby 1.8, how does it work?Aaron Patterson2010-11-301-1/+1
|
* removing arel 1.0 compatibilityAaron Patterson2010-11-301-4/+1
|
* testing Relation#table_nameAaron Patterson2010-11-301-0/+4
|
* cleaning up where_values_hashAaron Patterson2010-11-301-7/+7
|
* only returning where values for the corresponding relation, also filtering ↵Aaron Patterson2010-10-301-2/+7
| | | | where value hash based on table name [#5234 state:resolved] [#5184 state:resolved]
* exec returns an AR::ResultAaron Patterson2010-10-261-1/+1
|
* adding bind_values to relationsAaron Patterson2010-10-261-1/+1
|
* 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
|