Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Ensure not to load the entire association when bulk updating existing ↵ | Pratik Naik | 2010-04-14 | 1 | -10/+10 |
| | | | | records using nested attributes | ||||
* | Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...) | Jeremy Kemper | 2010-04-10 | 1 | -1/+2 |
| | |||||
* | Some doc updates reflecting the new query API | Pratik Naik | 2010-04-08 | 1 | -1/+1 |
| | |||||
* | Reset named scope cache whenever the @target is reset | Pratik Naik | 2010-04-07 | 1 | -2/+9 |
| | |||||
* | Memoize association.named_scope calls | Pratik Naik | 2010-04-05 | 1 | -0/+3 |
| | |||||
* | keep AssociationProxy#to_a to avoid warning in Array(post.author), and ↵ | Xavier Noria | 2010-03-12 | 1 | -0/+1 |
| | | | | | | | | delegate it to @target in association collections [#4165 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Get rid of construct_count_options_from_args | Pratik Naik | 2010-01-19 | 1 | -3/+4 |
| | |||||
* | Inherit named scope class Scope from Relation | Pratik Naik | 2010-01-18 | 1 | -2/+0 |
| | |||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -3/+6 |
| | |||||
* | Add Relation#includes to be an equivalent of current finder option :include | Pratik Naik | 2010-01-03 | 1 | -1/+1 |
| | |||||
* | Get rid of Model.construct_finder_arel_with_includes. Use ↵ | Pratik Naik | 2010-01-03 | 1 | -1/+1 |
| | | | | construct_finder_arel instead | ||||
* | Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally ↵ | José Valim | 2009-12-30 | 1 | -1/+8 |
| | | | | remove it. | ||||
* | Migrate all the calculation methods to Relation | Pratik Naik | 2009-12-29 | 1 | -1/+1 |
| | |||||
* | Add Model.having and Relation#having | Pratik Naik | 2009-12-29 | 1 | -1/+1 |
| | |||||
* | Add Model.readonly and association_collection#readonly finder method | Pratik Naik | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Add Model.lock and relation#lock now that arel has locking | Pratik Naik | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Add Model.from and association_collection#from finder methods | Pratik Naik | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | Rewrite AssociationCollection#find using relations | Pratik Naik | 2009-12-27 | 1 | -19/+13 |
| | |||||
* | Add new finder methods to association collection. | Pratik Naik | 2009-12-27 | 1 | -2/+17 |
| | |||||
* | Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks | Joshua Peek | 2009-10-12 | 1 | -1/+1 |
| | |||||
* | Added back support for destroying an association's object by id. [#2306 ↵ | Joshua Nichols | 2009-08-09 | 1 | -0/+1 |
| | | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Merge docrails | Pratik Naik | 2009-07-25 | 1 | -2/+2 |
| | |||||
* | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 1 | -1/+13 |
| | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question. | ||||
* | Revert "Generate proper :counter_sql from :finder_sql when there is a ↵ | Yehuda Katz + Carl Lerche | 2009-06-22 | 1 | -13/+1 |
| | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql. | ||||
* | Generate proper :counter_sql from :finder_sql when there is a newline ↵ | Patrick Joyce | 2009-06-21 | 1 | -1/+13 |
| | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Implement #many? for NamedScope and AssociationCollection using #size [#1500 ↵ | Chris Kampmeier | 2009-05-17 | 1 | -0/+9 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Providing support for :inverse_of as an option to associations. | Murray Steele | 2009-05-04 | 1 | -2/+6 |
| | | | | | | | | | | | | | | | | | | | | | | You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Merge docrails | Pratik Naik | 2009-03-16 | 1 | -5/+9 |
| | |||||
* | Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved] | Luca Guidi | 2009-03-12 | 1 | -19/+32 |
| | | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add tests for AssociationCollection#find_each and ↵ | Pratik Naik | 2009-03-11 | 1 | -1/+1 |
| | | | | AssociationCollection#find_in_batches | ||||
* | Fix preloading of has_one :through associations on belongs_to [#1507 ↵ | Matt Jones | 2008-12-18 | 1 | -1/+5 |
| | | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Revert "Fix: counter_cache should decrement on deleting associated records." | Jeremy Kemper | 2008-12-10 | 1 | -3/+0 |
| | | | | | | [#1196 state:open] This reverts commit 05f2183747c8e75c9e8bbaadb9573b4bdf41ecfc. | ||||
* | Fix: counter_cache should decrement on deleting associated records. | Emilio Tagua | 2008-12-10 | 1 | -0/+3 |
| | | | | | | [#1195 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Merge with docrails. Also add a rake task to generate guides in your rails ↵ | Pratik Naik | 2008-10-21 | 1 | -1/+7 |
| | | | | | | | | application : rake doc:guides The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse. | ||||
* | Ensure association proxy responds to private class methods defined in ↵ | Pratik Naik | 2008-10-16 | 1 | -2/+2 |
| | | | | associated class. [#1083] | ||||
* | Allow class methods to be sent (via #send) to association proxy (fix for bug ↵ | Ian White | 2008-10-16 | 1 | -0/+4 |
| | | | | | | introduced by 691aa20) [#1083] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Make AssociationCollection start transactions in the correct database. | Hongli Lai (Phusion) | 2008-09-23 | 1 | -4/+19 |
| | | | | | | | | | | AssociationCollection now starts transactions by calling AssociationCollection#transaction instead of @owner.transaction or @reflection.klass.transaction. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1081 state:committed] | ||||
* | Association#first and last should not load the association if not needed. ↵ | Jan De Poorter | 2008-09-22 | 1 | -3/+4 |
| | | | | | | [#1091 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | When counting grouped records the target should be loaded to return a valid ↵ | miloops | 2008-09-15 | 1 | -0/+2 |
| | | | | | | | | | groups count result. Without this change count_records will group for the count in the query and return erroneous results. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#937 state:committed] | ||||
* | Revert "Add :accessible option to Associations for allowing mass assignments ↵ | Pratik Naik | 2008-09-10 | 1 | -6/+0 |
| | | | | | | | | | | | | using hash. [#474 state:resolved]" This reverts commit e0750d6a5c7f621e4ca12205137c0b135cab444a. Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_collection.rb | ||||
* | Add special AssociationReflection methods for creating association objects, ↵ | Hongli Lai (Phusion) | 2008-09-09 | 1 | -4/+6 |
| | | | | | | | | and modify the code base to use those methods instead of creating association objects directly. This allows plugins to hook into association object creation behavior. [#986 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Merge docrails | Pratik Naik | 2008-09-03 | 1 | -5/+31 |
| | |||||
* | Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support. | Ernie Miller | 2008-08-28 | 1 | -0/+29 |
| | | | | | | [#831 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fixed AssociationCollection#<< resulting in unexpected values in @target ↵ | Ernie Miller | 2008-08-08 | 1 | -1/+1 |
| | | | | | | when :uniq => true Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Add :accessible option to Associations for allowing mass assignments using ↵ | David Dollar | 2008-07-14 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | hash. [#474 state:resolved] Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate ActiveRecord models. class Post < ActiveRecord::Base belongs_to :author, :accessible => true has_many :comments, :accessible => true end post = Post.create({ :title => 'Accessible Attributes', :author => { :name => 'David Dollar' }, :comments => [ { :body => 'First Post!' }, { :body => 'Nested Hashes are great!' } ] }) post.comments << { :body => 'Another Comment' } Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add block syntax to HasManyAssociation#build. [#502 state:resolve] | Jason Dew | 2008-07-14 | 1 | -3/+6 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved] | Cheah Chu Yeow | 2008-07-09 | 1 | -1/+1 |
| | |||||
* | Ensure AssociationCollection#size considers all unsaved record. [#305 ↵ | Pratik Naik | 2008-07-02 | 1 | -1/+1 |
| | | | | | | state:resolved] [sds] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge docrails. | Pratik Naik | 2008-05-25 | 1 | -2/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Create through associations can now work with blocks. | Ryan Bates | 2008-05-24 | 1 | -2/+8 |
| | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#248 state:resolved] |