Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor AssociationCollection#include? with objects in memory | Carlos Antonio da Silva | 2010-10-02 | 1 | -4/+3 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | AssociationCollection#include? working properly for objects added with build ↵ | Marcelo Giorgi | 2010-09-30 | 1 | -0/+13 |
| | | | | method [#3472 state:resolved] | ||||
* | Refactor association_collection uniq method. | Emilio Tagua | 2010-09-22 | 1 | -4/+3 |
| | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Use scoped here to get the scoped where | Santiago Pastorino | 2010-09-05 | 1 | -5/+3 |
| | |||||
* | While creating a new record using has_many create method default scope of ↵ | Neeraj Singh | 2010-08-19 | 1 | -1/+6 |
| | | | | | | | | | | | 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> | ||||
* | fixed joining of attributes when using find_or_create_by with multiple ↵ | Jon Buda | 2010-07-28 | 1 | -1/+1 |
| | | | | | | attributes through an association Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | No need to check for :uniq | Neeraj Singh | 2010-07-26 | 1 | -6/+3 |
| | | | | | | [#5170 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Make use of tap to return a previously used var | Santiago Pastorino | 2010-07-21 | 1 | -4/+4 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | association load target shouldn't replace records | Szetobo | 2010-07-21 | 1 | -3/+4 |
| | | | | | | | | from db if it is already loaded by nested attributes assignment [#5053 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | In nested_attributes when association is not loaded and association | Subba Rao Pasupuleti | 2010-07-21 | 1 | -1/+8 |
| | | | | | | | | record is saved and then in memory record attributes should be saved [#5053 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Removed warnings when a variable is shadowed | Łukasz Strzałkowski | 2010-07-19 | 1 | -3/+3 |
| | |||||
* | Remove unintentional API changes. [#1108] | Pratik Naik | 2010-07-14 | 1 | -9/+4 |
| | |||||
* | count method should not take options if it is operated on has_many ↵ | Neeraj Singh | 2010-07-13 | 1 | -2/+5 |
| | | | | | | | | association which has finder_sql or counter_sql [#2395 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | fix ActiveRecord `destroy_all` so it returns destroyed records | Mislav Marohnić | 2010-07-08 | 1 | -3/+4 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Don't remove scheduled destroys when loading an association. [#4642 ↵ | James Le Cuirot | 2010-07-01 | 1 | -1/+6 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | AssociationCollection#create_by_*, find_or_create_by_* work properly now. ↵ | Aaron Patterson | 2010-06-29 | 1 | -0/+11 |
| | | | | | | [#1108 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Don't define block, just yield if block is given. | Emilio Tagua | 2010-06-24 | 1 | -7/+7 |
| | |||||
* | Merge remote branch 'rails/master' | Xavier Noria | 2010-06-20 | 1 | -1/+5 |
|\ | | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb | ||||
| * | Don't overwrite unsaved updates when loading an association but preserve the ↵ | James Le Cuirot | 2010-06-20 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | order of the loaded records. Reapplied from before but now allows already-saved records to be refreshed. [#4830 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | | Adds title to activerecord/lib/active_record/associations/* | Rizwan Reza | 2010-06-16 | 1 | -0/+2 |
|/ | |||||
* | Revert "Don't overwrite unsaved updates when loading an association but ↵ | José Valim | 2010-06-11 | 1 | -1/+1 |
| | | | | | | | | preserve the order of the loaded records. [#4642 state:open]" This commit introduced a regression described in ticket [#4830]. This reverts commit 0265c708b9696c3943518ad5f3dabdc22c5eba11. | ||||
* | Don't overwrite unsaved updates when loading an association but preserve the ↵ | James Le Cuirot | 2010-06-09 | 1 | -1/+1 |
| | | | | | | order of the loaded records. [#4642 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Properly cache association_collection#scopes calls having arguments | Pratik Naik | 2010-06-04 | 1 | -1/+2 |
| | |||||
* | 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> |