Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Make sure default_scope#create checks for options[:conditions] [#2181 ↵ | Pratik Naik | 2009-05-18 | 1 | -0/+10 | |
| | | | | | | | | state:resolved] [James Le Cuirot] | |||||
| * | Fixed limited eager loading associations with numbers in the name [#2668 ↵ | Benjamin Floering | 2009-05-18 | 1 | -0/+1 | |
| | | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
| * | Cherry-pick core extensions | Jeremy Kemper | 2009-05-13 | 1 | -0/+2 | |
| | | ||||||
| * | Revert "Fixed bug with polymorphic has_one :as pointing to an STI record" | Jeremy Kemper | 2009-05-11 | 1 | -4/+0 | |
| | | | | | | | | | | | | [#2594 state:open] This reverts commit 99c103be1165da9c8299bc0977188ecf167e06a5. | |||||
| * | Allow you to pass :all_blank to :reject_if option to automatically create a ↵ | Mike Breen | 2009-05-10 | 1 | -0/+2 | |
| | | | | | | | | Proc that will reject any record with blank attributes. | |||||
| * | Providing support for :inverse_of as an option to associations. | Murray Steele | 2009-05-04 | 4 | -0/+19 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> | |||||
| * | Fixed bug with polymorphic has_one :as pointing to an STI record | Ruy Asan | 2009-05-01 | 1 | -0/+4 | |
| | | | | | | | | | | | | [#2594 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | | Merge branch 'master' into active_model | Pratik Naik | 2009-04-22 | 4 | -9/+10 | |
|\| | | | | | | | | | Conflicts: activeresource/lib/active_resource/validations.rb | |||||
| * | Fix tests for sqlite3 3.6.xx | Pratik Naik | 2009-04-21 | 1 | -1/+1 | |
| | | ||||||
| * | Ensure :dependent => :delete_all works for association with hash conditions | Pratik Naik | 2009-04-20 | 2 | -8/+7 | |
| | | ||||||
| * | Ensure JoinAssociation uses aliased table name when multiple associations ↵ | Pratik Naik | 2009-04-20 | 1 | -0/+2 | |
| | | | | | | | | have hash conditions on the same table | |||||
| * | Added :touch option to belongs_to associations that will touch the parent ↵ | David Heinemeier Hansson | 2009-04-16 | 1 | -1/+1 | |
| | | | | | | | | record when the current record is saved or destroyed [DHH] | |||||
* | | Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵ | Pratik Naik | 2009-03-21 | 3 | -9/+19 | |
| | | | | | | | | Model.validate :method and likewise | |||||
* | | Move all the Active Record validations to Active Model | Pratik Naik | 2009-03-19 | 1 | -5/+5 | |
|/ | ||||||
* | Ensure AutosaveAssociation runs remove callbacks [#2146 state:resolved] | Luca Guidi | 2009-03-12 | 1 | -1/+48 | |
| | | | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Returning nil from named scope lambda is equivalent to an empty hash [#1773 ↵ | Elijah Miller | 2009-03-12 | 1 | -1/+3 | |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Ensure has_many :through works with changed primary keys [#736 state:resolved] | Jim Remsik and Tim Pope | 2009-03-09 | 3 | -2/+8 | |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Fix find_by_last when order is given [#2127 state:committed] | Jan De Poorter | 2009-03-09 | 1 | -0/+1 | |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | |||||
* | Ensure validates_uniqueness_of considers limit on the field. [#1042 ↵ | Arthur Klepchukov | 2009-03-07 | 1 | -0/+3 | |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Ensure belongs_to association with a counter cache in name spaced model ↵ | Adam Cooper | 2009-03-06 | 2 | -0/+12 | |
| | | | | | | works [#1678 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Ensure replacing has_one associations respects the supplied :dependent ↵ | Dimitri Krassovski | 2009-03-06 | 1 | -0/+1 | |
| | | | | | | option. [#1305 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Methods invoked within named scope Procs should respect the scope stack. ↵ | jvoorhis | 2009-03-06 | 1 | -0/+2 | |
| | | | | | | [#1267 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Fixed bug that makes named_scopes _forgot_ current scope | Diego Algorta | 2009-02-25 | 1 | -0/+6 | |
| | ||||||
* | Changed API of NestedAttributes to take an array, or hash with index keys, ↵ | Lance Ivy | 2009-02-13 | 2 | -3/+3 | |
| | | | | | | | | of hashes that have the id on the inside of the attributes hash and updated the FormBuilder to produce such hashes. Also fixed NestedAttributes with composite ids. Signed-off-by: Michael Koziarski <michael@koziarski.com> Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> [#1892 state:committed] | |||||
* | Add support for nested object forms to ActiveRecord and the helpers in ↵ | Eloy Duran | 2009-02-01 | 5 | -0/+24 | |
| | | | | | | | | ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed] | |||||
* | Make sure inner scope conditions get a preference over the outer ones | Pratik Naik | 2009-01-24 | 2 | -0/+8 | |
| | ||||||
* | Preload uses exclusive scope [#643 state:resolved] | Frederick Cheung | 2008-12-26 | 1 | -0/+6 | |
| | | | | | | | | | With self referential associations, the scope for the the top level should not affect fetching of associations, for example when doing Person.male.find :all, :include => :friends we should load all of the friends for each male, not just the male friends. | |||||
* | Fix configure_dependency_for_has_many not quoting conditions properly [#1461 ↵ | Frederick Cheung | 2008-12-21 | 1 | -0/+1 | |
| | | | | state:resolved] | |||||
* | Fix preloading of has_one :through associations on belongs_to [#1507 ↵ | Matt Jones | 2008-12-18 | 3 | -0/+5 | |
| | | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | |||||
* | Add :having option to find, to use in combination with grouped finds. Also ↵ | miloops | 2008-12-01 | 3 | -0/+3 | |
| | | | | | | | added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1028 state:committed] | |||||
* | Fix default_scope to work in combination with named scopes | Tom Stuart | 2008-11-17 | 1 | -7/+7 | |
| | | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com> | |||||
* | Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) | Pratik Naik | 2008-11-16 | 1 | -0/+12 | |
| | ||||||
* | Revert "Added default_scope to Base [#1381 state:committed] (Paweł ↵ | David Heinemeier Hansson | 2008-11-16 | 1 | -12/+0 | |
| | | | | | | Kondzior)" -- won't gel with threads. This reverts commit ff594b2bc94ff2a942fe6ca05672387722dee686. | |||||
* | Added default_scope to Base [#1381 state:committed] (Paweł Kondzior) | David Heinemeier Hansson | 2008-11-16 | 1 | -0/+12 | |
| | ||||||
* | fix assignment to has_one :through associations. | Matt Jones | 2008-11-15 | 3 | -0/+10 | |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Ensure association proxy responds to private class methods defined in ↵ | Pratik Naik | 2008-10-16 | 1 | -0/+8 | |
| | | | | associated class. [#1083] | |||||
* | Ensure methods called on association proxies respect access control. [#1083 ↵ | Pratik Naik | 2008-10-13 | 2 | -1/+18 | |
| | | | | state:resolved] [Adam Milligan, Pratik] | |||||
* | explicitly including child associations that are also included in the parent ↵ | Will Bryant | 2008-10-10 | 2 | -0/+3 | |
| | | | | | | | association definition should not result in double records in the collection/double loads (#1110) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1110 state:committed] | |||||
* | Fix has_many :through when the source is a belongs_to association. [#323 ↵ | Zach Dennis | 2008-10-04 | 1 | -0/+2 | |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Allow for the dirty tracking to work with the aliased name of aliased ↵ | Rich Cavanaugh | 2008-09-13 | 1 | -0/+1 | |
| | | | | | | | attributes. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#812 state:committed] | |||||
* | Use select and change test so new tests can work on postgres. | miloops | 2008-09-12 | 2 | -3/+3 | |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Improve test coverage when using the group option in find, has_many or ↵ | miloops | 2008-09-11 | 2 | -0/+5 | |
| | | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Revert "Add :accessible option to Associations for allowing mass assignments ↵ | Pratik Naik | 2008-09-10 | 2 | -7/+1 | |
| | | | | | | | | | | | | 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 | |||||
* | Added :constructor and :converter options to composed_of and deprecated the ↵ | Rob Anderton | 2008-09-10 | 1 | -1/+19 | |
| | | | | | | conversion block Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Support :limit on update_all so that has_many with :limit can be safely updated | Tarmo Tänav | 2008-09-10 | 1 | -0/+1 | |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Fixed ordering in ↵ | Tarmo Tänav | 2008-08-22 | 1 | -1/+1 | |
| | | | | test_find_in_association_with_custom_finder_sql_and_multiple_interpolations | |||||
* | Fix generated WHERE IN query for named scopes. [#583 state:resolved] | Philip Hallstrom | 2008-08-21 | 1 | -0/+2 | |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Test for eager loading of STI subclasses from htm associations | Tarmo Tänav | 2008-08-16 | 1 | -0/+3 | |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Fix file permissions | Tarmo Tänav | 2008-07-31 | 3 | -0/+0 | |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | |||||
* | Use klass.sti_name to make sure associations take store_full_sti_class into ↵ | Daniel Guettler | 2008-07-22 | 1 | -0/+7 | |
| | | | | | | account. [#671 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> |