Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | test_get_ids_for_ordered_association fixed | gregolsen | 2012-01-31 | 1 | -1/+1 |
| | |||||
* | ids_reader method fixed, test added to has_many association | gregolsen | 2012-01-31 | 1 | -0/+1 |
| | |||||
* | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 1 | -0/+2 |
| | | | | | | See the CHANGELOG for details. Fixes #950. | ||||
* | Deprecate set_sequence_name in favour of self.sequence_name= | Jon Leighton | 2011-11-29 | 1 | -1/+1 |
| | |||||
* | Allow the :class_name option for associations to take a symbol. | Jon Leighton | 2011-11-04 | 1 | -0/+1 |
| | | | | | This is to avoid confusing newbies, and to be consistent with the fact that other options like :foreign_key already allow a symbol or a string. | ||||
* | Refactor tests to be less brittle | Jon Leighton | 2011-06-12 | 1 | -0/+12 |
| | |||||
* | Add interpolation of association conditions back in, in the form of proc { ↵ | Jon Leighton | 2011-02-14 | 1 | -9/+6 |
| | | | | ... } rather than instance_eval-ing strings | ||||
* | belongs_to records should be initialized within the association scope | Jon Leighton | 2011-01-16 | 1 | -0/+1 |
| | |||||
* | Add create_association! for belongs_to | Jon Leighton | 2011-01-16 | 1 | -0/+1 |
| | |||||
* | Construct an actual ActiveRecord::Relation object for the association scope, ↵ | Jon Leighton | 2011-01-07 | 1 | -1/+0 |
| | | | | rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things. | ||||
* | Allow assignment on has_one :through where the owner is a new record [#5137 ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+1 |
| | | | | | | | | | | state:resolved] This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message! | ||||
* | Verify that when has_many associated objects are destroyed via :dependent => ↵ | Jon Leighton | 2010-12-31 | 1 | -1/+16 |
| | | | | :destroy, when the parent is destroyed, the callbacks are run | ||||
* | Convert :primary_key in association to a string before comparing to column ↵ | Denis Odorcic | 2010-10-30 | 1 | -0/+1 |
| | | | | names, so that for example :primary_key => :another_pk works as well [#5605 state:resolved] | ||||
* | Add :dependent = to has_one and has_many [#3075 state:resolved] | Rizwan Reza | 2010-03-28 | 1 | -0/+5 |
| | |||||
* | Fix associations to call :destroy or :delete based on the right :dependent ↵ | Carlos Antonio da Silva | 2010-03-09 | 1 | -2/+2 |
| | | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Simplify calculation scope building. Remove :order from associations as it ↵ | Pratik Naik | 2010-01-18 | 1 | -5/+3 |
| | | | | is troublesome w/ calculation methods using postgresql. | ||||
* | delete correct records for a has_many with :primary_key and :dependent => ↵ | Matt Jones | 2009-11-10 | 1 | -0/+2 |
| | | | | | | :delete_all Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Make has_one with :conditions hash scope build or creation of the associated ↵ | Luciano G Panaro | 2009-09-28 | 1 | -0/+2 |
| | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed] | ||||
* | Fix has_one with foreign_key and primary_key association bug which caused ↵ | Graeme Porteous | 2009-09-12 | 1 | -0/+1 |
| | | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com> | ||||
* | Explicitely setting `autosave => false' should override new_record ↵ | Eloy Duran | 2009-09-12 | 1 | -0/+5 |
| | | | | | | autosaving. [#2214 state:resolved] Original author is Jacob. | ||||
* | Changed ActiveRecord to use new callbacks and speed up observers by only ↵ | José Valim | 2009-09-08 | 1 | -0/+5 |
| | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | has_many :through create should not raise validation errors | railsbob | 2009-08-09 | 1 | -0/+2 |
| | | | | | | [#2934 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | added :order option to find :first methods and associations as otherwise ↵ | Raimonds Simanovskis | 2009-08-06 | 1 | -2/+6 |
| | | | | | | | | Oracle tests were failing Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method | ||||
* | Add primary_key option to belongs_to association | Szymon Nowak | 2009-07-15 | 1 | -0/+1 |
| | | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 1 | -0/+4 |
| | | | | | | | | | 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 | -4/+0 |
| | | | | | | | | 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 | -0/+4 |
| | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Merge branch 'master' into active_model | Pratik Naik | 2009-04-22 | 1 | -7/+6 |
|\ | | | | | | | | | Conflicts: activeresource/lib/active_resource/validations.rb | ||||
| * | Ensure :dependent => :delete_all works for association with hash conditions | Pratik Naik | 2009-04-20 | 1 | -7/+6 |
| | | |||||
* | | Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵ | Pratik Naik | 2009-03-21 | 1 | -3/+6 |
|/ | | | | Model.validate :method and likewise | ||||
* | 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 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> | ||||
* | Fix configure_dependency_for_has_many not quoting conditions properly [#1461 ↵ | Frederick Cheung | 2008-12-21 | 1 | -0/+1 |
| | | | | state:resolved] | ||||
* | 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 | 1 | -1/+12 |
| | | | | state:resolved] [Adam Milligan, Pratik] | ||||
* | Use select and change test so new tests can work on postgres. | miloops | 2008-09-12 | 1 | -2/+2 |
| | | | | 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 | 1 | -0/+2 |
| | | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Fix file permissions | Tarmo Tänav | 2008-07-31 | 1 | -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> | ||||
* | Add support for :primary_key option to has_one as well as has_many so that a ↵ | Brad Greenlee | 2008-07-06 | 1 | -0/+1 |
| | | | | | | key other than the default primary key can be used for the association Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Add has_many :primary_key option to allow setting the primary key on a has ↵ | Andre Arko | 2008-07-06 | 1 | -0/+2 |
| | | | | | | many association Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Add :validate option to associations. [#301 state:resolved] | Jan De Poorter | 2008-06-11 | 1 | -1/+3 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix faulty tests introduced in 8d0b4fa39 | Michael Koziarski | 2008-05-24 | 1 | -1/+1 |
| | |||||
* | Added :select option to has_one and belongs_to, remove unused :order option ↵ | josevalim | 2008-05-24 | 1 | -0/+2 |
| | | | | | | | on belongs_to. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#241 state:resolved] | ||||
* | Add ActiveRecord option to store the full class name on STI's type column, ↵ | Rodrigo Kochenburger | 2008-05-13 | 1 | -0/+4 |
| | | | | | | allowing one to have STI subclasses in different namespaces [#114] Signed-off-by: rick <technoweenie@gmail.com> | ||||
* | Introduce the :readonly option to all associations. Records from the ↵ | Jeremy Kemper | 2008-02-13 | 1 | -0/+3 |
| | | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | move assets and models | Jeremy Kemper | 2008-01-18 | 1 | -0/+114 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |