aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/query_methods.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate ActiveRecord::Base.scoped.Jon Leighton2012-07-271-1/+1
| | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
* improve NullRelation docs [ci skip]Vijay Dev2012-07-211-4/+4
|
* minor copy edits [ci skip]Vijay Dev2012-07-211-1/+1
|
* TypoOscar Del Ben2012-07-161-1/+0
|
* Add documentation for query_methods bang methodsOscar Del Ben2012-07-161-1/+20
|
* Add nodoc to create_with_valueOscar Del Ben2012-07-161-1/+1
| | | | | Reason: all *_value methods are defined dynamically and so don't appear in the documentation.
* Add documentation for arel and build_arelOscar Del Ben2012-07-161-0/+2
|
* Add documentation for create_withOscar Del Ben2012-07-161-1/+19
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-07-151-2/+39
|\
| * Add docs for having, lock and readonlyOscar Del Ben2012-07-071-0/+12
| |
| * Add doc for joins and improve includes docOscar Del Ben2012-07-071-2/+17
| |
| * Add docs for eager_laod and preloadOscar Del Ben2012-07-071-0/+10
| |
* | fix association :extend optionJon Leighton2012-07-131-1/+1
| |
* | support relations created with a table aliasJon Leighton2012-07-131-1/+1
|/
* minor text change [ci skip]Vijay Dev2012-07-071-1/+1
|
* Revert "Add nodoc to relation methods"Vijay Dev2012-07-071-22/+24
| | | | | | This reverts commit c47a698d5d497340d4e349257522212173865838. Reason: Let's revert pending further discussions
* Add nodoc to relation methodsOscar Del Ben2012-07-061-24/+22
|
* Add order docsOscar Del Ben2012-07-051-0/+10
|
* Add group documentationOscar Del Ben2012-07-051-0/+12
|
* Add documentation for includesOscar Del Ben2012-07-051-0/+11
|
* fixing typo in from documentationSubba Rao Pasupuleti2012-06-281-2/+2
|
* Use args.flatten! in query methods when applicableCarlos Antonio da Silva2012-06-251-7/+12
| | | | | Try to use more destructive methods on *args when applicable, to avoid creating new objects.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-06-221-3/+15
|\
| * fixes a few mistakes in api docs [ci skip]Vijay Dev2012-06-221-4/+2
| |
| * Add documentation for ActiveRecord::QueryMethods#reverse_order [ci skip]Florent Guilleux2012-06-161-0/+3
| |
| * Add documentation for ActiveRecord::QueryMethods#offset [ci skip]Ulises Cabanillas2012-06-161-0/+7
| |
| * Add documentation for ActiveRecord::QueryMethods#limit [ci skip]Florent Guilleux2012-06-161-3/+7
| |
* | disallow mutating a relation once loadedJon Leighton2012-06-221-18/+20
| |
* | Removing composed_of from ActiveRecord.Steve Klabnik2012-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807
* | Documentation for where and where! methods on relations.David Paschich2012-06-181-0/+92
|/ | | | Based on examples seen in the Rails test suite. [ci skip]
* modulize AR::NullRelationAkira Matsuda2012-06-011-1/+1
| | | | now we can invoke previously added scope extension methods
* Relation#from to accept other Relation objectsRadoslav Stankov2012-05-171-5/+29
| | | | Record.from("(#{sub_query.to_sql})") -> Record.from(sub_query) Record.from("(#{sub_query.to_sql}) a") -> Record.from(sub_query, :a)
* CollectionProxy < RelationJon Leighton2012-05-111-21/+21
| | | | | | | | | | | | | | | | | | | | | This helps bring the interfaces of CollectionProxy and Relation closer together, and reduces the delegation backflips we need to perform. For example, first_or_create is defined thus: class ActiveRecord::Relation def first_or_create(...) first || create(...) end end If CollectionProxy < Relation, then post.comments.first_or_create will hit the association's #create method which will actually add the new record to the association, just as post.comments.create would. With the previous delegation, post.comments.first_or_create expands to post.comments.scoped.first_or_create, where post.comments.scoped has no knowledge of the association.
* use a hash to store relation valuesJon Leighton2012-04-131-18/+43
|
* doesn't make sense for select! to take a blockJon Leighton2012-04-131-8/+3
|
* remove apply_finder_options call from AssociationScopeJon Leighton2012-04-131-1/+1
|
* Make Relation#extending work like other value methodsJon Leighton2012-04-131-9/+6
|
* Add bang versions of relation query methods.Jon Leighton2012-04-121-84/+135
| | | | | The main reason for this is that I want to separate the code that does the mutating from the code that does the cloning.
* fix activerecord query_method regression with offset into FixnumDenis Jean2012-03-121-1/+1
| | | | | | add test to show offset query_methods on mysql & mysql2 change test to cover public API
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-02-091-2/+2
|\ | | | | | | | | Conflicts: activerecord/lib/active_record/relation/query_methods.rb
| * use appropriate words for docs of Model.noneRohit Arondekar2012-02-071-2/+2
| |
| * minor tidy up of none relation query methodRohit Arondekar2012-02-061-2/+2
| |
| * Fix code example in ActiveRecord::Relation#noneCarlos Antonio da Silva2012-02-011-3/+3
| |
* | document the AR none method [ci skip]Vijay Dev2012-02-011-7/+7
|/
* Added `none` query method to return zero records.Juanjo Bazán2012-01-311-0/+33
| | | And added NullRelation class implementing the null object pattern for the `Relation` class.
* select doesn't take multiple arguments - fixes #4539 [ci skip]Vijay Dev2012-01-191-5/+5
| | | | | Also, fixed the bit about returning AM::MissingAttributeError. This seems to be fixed earlier in 3-2-stable only.
* infer references from Relation#orderJon Leighton2012-01-161-1/+7
|
* store references as a stringJon Leighton2012-01-161-1/+1
|
* automatically add references when we canJon Leighton2012-01-161-1/+3
|
* Add ActiveRecord::Relation#references (#950)Jon Leighton2012-01-161-1/+19
|