aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
Commit message (Collapse)AuthorAgeFilesLines
* Add extra hash conditions tests for named_scopePratik Naik2008-06-281-0/+1
|
* Fix column collision with named_scope and :joins. [#46 state:resolved]Mark Catley2008-06-221-1/+6
|
* Fixed that scopes defined with a string name could not be composedTarmo Tänav2008-06-221-0/+1
|
* fix mergerick2008-06-192-2/+5
|\
| * Disable validations for associated belongs_to record by defaultPratik Naik2008-06-111-2/+2
| |
| * Add :validate option to associations. [#301 state:resolved]Jan De Poorter2008-06-112-1/+4
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | fix eager loading with dynamic findersBrandon Keepers2008-06-093-1/+3
|/
* Fix faulty tests introduced in 8d0b4fa39Michael Koziarski2008-05-241-1/+1
|
* Added :select option to has_one and belongs_to, remove unused :order option ↵josevalim2008-05-241-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 Kochenburger2008-05-131-0/+4
| | | | | | allowing one to have STI subclasses in different namespaces [#114] Signed-off-by: rick <technoweenie@gmail.com>
* Dirty attributes aren't cleared if save fails. [#174 state:resolved]Xavier Noria2008-05-121-0/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure hm:t preloading honours reflection options. [#137 state:resolved]Frederick Cheung2008-05-111-0/+4
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix validates_uniqueness_of for SQL keywords [#23 state:resolved]Alex MacCaw2008-05-111-0/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Calling ActiveRecord#inspect on an unloaded association won't wipe the ↵Andreas Neuhaus2008-05-081-0/+4
| | | | | | collection [#9 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Ensure correct record is returned when preloading has_one where more than ↵Frederick Cheung2008-05-061-0/+2
| | | | | | | one row exists Signed-off-by: Michael Koziarski <michael@koziarski.com> [#73 state:closed]
* Added missing filesDavid Heinemeier Hansson2008-05-011-0/+4
|
* Fixed AssociationsPreload such that it doesnt require foreign keys to be ↵David Heinemeier Hansson2008-04-301-0/+2
| | | | integers (fcheung) [#33 state:resolved]
* Change tests against all scope to base scope as all is now used as a finder ↵David Heinemeier Hansson2008-04-302-0/+3
| | | | alias
* Ensure table names are quoted by the association preloading code.Frederick Cheung2008-04-263-0/+14
| | | | | | [#45 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes ↵Josh Peek2008-04-071-0/+2
| | | | | | #10289. [scott_willson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor HasManyThroughAssociation to inherit from HasManyAssociation. ↵Pratik Naik2008-04-061-0/+14
| | | | | | Association callbacks and <association>_ids= now work with hm:t. Closes #11516 [rubyruy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: work around YAML serialization error exposed by validations ↵Jeremy Kemper2008-04-011-3/+2
| | | | | | tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_many :through would ignore the hash conditions (closes ↵David Heinemeier Hansson2008-03-281-0/+5
| | | | | | #11447) [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen]Rick Olson2008-03-244-0/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* has_one :through supports :source_type. Fix up some tests. References #4756.Jeremy Kemper2008-03-221-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow association scoping for built/created records if :conditions is ↵Rick Olson2008-03-211-0/+3
| | | | | | specified as a hash. Closes #11393 [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add has_one :through support, finally. Closes #4756 [thechrisoshow]Rick Olson2008-03-214-0/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add :readonly option to HasManyThrough associations. Closes #11156 [miloops]Pratik Naik2008-03-071-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make dynamic finders respect the :include on HasManyThrough associations. ↵Michael Koziarski2008-02-182-1/+2
| | | | | | Closes #10998. [cpytel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce the :readonly option to all associations. Records from the ↵Jeremy Kemper2008-02-132-0/+4
| | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert r8742: remove has_many with :group option since it has sketchy sql ↵Jeremy Kemper2008-02-031-1/+0
| | | | | | support. Closes #10480. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey ↵Jeremy Kemper2008-02-023-1/+8
| | | | | | Kondratenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed preloading belongs_to associations which reference a custom foreign ↵Jeremy Kemper2008-01-312-0/+8
| | | | | | key. References #9640. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure count works on has_many :through associations using :group. ↵Michael Koziarski2008-01-271-0/+1
| | | | | | Closes #10480 [remvee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure that belongs_to counter decrements when assigning nil Closes ↵Michael Koziarski2008-01-261-2/+2
| | | | | | #10804 [jeanmartin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to supports :dependent => :destroy and :delete. Closes #10592.Jeremy Kemper2008-01-191-1/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce preload query strategy for eager :includes. Closes #9640.Jeremy Kemper2008-01-191-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move assets and modelsJeremy Kemper2008-01-1845-0/+786
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de