aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/reflection_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add timestamps to TopicPratik Naik2010-11-021-5/+5
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* adding column named 'group' to ensure that nothing breaks given that 'group' ↵Neeraj Singh2010-06-231-5/+5
| | | | | | | | is sql reserved word [#4945 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* removing dead code from activerecord tests. [#4187 state:resolved]Aaron Patterson2010-03-151-6/+0
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Renamed AssociationReflection #collection_association? to #collection?.Eloy Duran2010-01-081-4/+4
|
* Moved the validation logic to the association reflection and refactored ↵Eloy Duran2010-01-071-8/+39
| | | | autosave_association.rb a bit.
* Add AssociationReflection#collection_association? which returns true if it's ↵Eloy Duran2010-01-071-0/+9
| | | | for a has_many or has_and_belongs_to_many association.
* Changed ActiveRecord::Base.store_full_sti_class to be true by default ↵David Heinemeier Hansson2010-01-031-0/+4
| | | | reflecting the previously announced Rails 3 default [DHH]
* delete correct records for a has_many with :primary_key and :dependent => ↵Matt Jones2009-11-101-2/+2
| | | | | | :delete_all Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-2/+2
| | | | | | deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>
* Make has_one with :conditions hash scope build or creation of the associated ↵Luciano G Panaro2009-09-281-2/+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 Porteous2009-09-121-2/+2
| | | | | | | | 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 Duran2009-09-121-3/+3
| | | | | | autosaving. [#2214 state:resolved] Original author is Jacob.
* has_many :through create should not raise validation errorsrailsbob2009-08-091-2/+2
| | | | | | [#2934 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-5/+5
| | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-011-2/+2
| | | | | | | | | 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.
* Changed ActiveRecord::Base.human_name to underscore the class name before it ↵Justin French2009-06-301-1/+7
| | | | | | | | | humanizes it This gives you 'Post comment' rather than 'Postcomment' by default. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2120 state:committed]
* Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-221-2/+2
| | | | | | | | 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 Joyce2009-06-211-2/+2
| | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix find_by_last when order is given [#2127 state:committed]Jan De Poorter2009-03-091-2/+2
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Ensure replacing has_one associations respects the supplied :dependent ↵Dimitri Krassovski2009-03-061-2/+3
| | | | | | option. [#1305 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add support for nested object forms to ActiveRecord and the helpers in ↵Eloy Duran2009-02-011-0/+9
| | | | | | | | ActionPack Signed-Off-By: Michael Koziarski <michael@koziarski.com> [#1202 state:committed]
* Introduce ActiveRecord::Reflection::ThroughReflection to simplify hm:t ↵Pratik Naik2008-10-041-0/+4
| | | | reflection logic
* Improve test coverage when using the group option in find, has_many or ↵miloops2008-09-111-2/+2
| | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Don't raise exception when comparing ActiveRecord::Reflection. [#842 ↵Ryan Bates2008-08-161-0/+4
| | | | | | 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 Greenlee2008-07-061-3/+3
| | | | | | key other than the default primary key can be used for the association Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Add :validate option to associations. [#301 state:resolved]Jan De Poorter2008-06-111-3/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix faulty tests introduced in 8d0b4fa39Michael Koziarski2008-05-241-2/+3
|
* Introduce the :readonly option to all associations. Records from the ↵Jeremy Kemper2008-02-131-3/+3
| | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-181-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+175
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de