aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Anchor DateTimeTest to fixed DateTime instead of a variable value based on ↵Geoff Buesing2007-12-071-3/+5
| | | | | | Time.now#advance#to_datetime. Works around issue on 64-bit platforms with Ruby's Time#to_datetime respecting fractional seconds, and database adapters not respecting them for DateTimes, throwing off before-and-after-save equality test. References #10080, #10073 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the truncation of strings longer than 50 chars should use inspect ↵David Heinemeier Hansson2007-12-061-3/+3
| | | | | | so newlines etc are escaped (closes #10385) [norbert] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager association test. Closes #10381 [alexey]Jeremy Kemper2007-12-051-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that habtm associations should be able to set :select as part of their ↵David Heinemeier Hansson2007-12-052-0/+7
| | | | | | definition and have that honored [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typos (closes #10378)David Heinemeier Hansson2007-12-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Try againDavid Heinemeier Hansson2007-12-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: we can't distinguish a fake 0 default in 4.xJeremy Kemper2007-12-051-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8272 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that options[:from] table names should never be quoted [DHH]David Heinemeier Hansson2007-12-051-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Base#becomes to turn a record into one of another class ↵David Heinemeier Hansson2007-12-031-1/+6
| | | | | | (mostly relevant for STIs) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that to_xml should not automatically pass :procs to associations ↵David Heinemeier Hansson2007-12-031-21/+48
| | | | | | included with :include (closes #10162) [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make reset return nil when using a dangling belongs_to association. Current ↵Michael Koziarski2007-11-291-0/+17
| | | | | | behaviour is to return false which can be confusing. Closes #10293 [fcheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* attr_protected and _accessible use sets of strings instead of arrays of ↵Jeremy Kemper2007-11-281-4/+12
| | | | | | symbols internally. Closes #10300. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* attr_readonly uses a set of strings instead of an array of symbols ↵Jeremy Kemper2007-11-282-2/+2
| | | | | | internally. References #10300. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures: support single-table inheritance. Closes #10234.Jeremy Kemper2007-11-264-1/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures: allow mixed usage to make migration easier and more ↵Jeremy Kemper2007-11-269-11/+64
| | | | | | attractive. Closes #10004. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow validates_acceptance_of to use a real attribute instead of only ↵David Heinemeier Hansson2007-11-251-0/+9
| | | | | | virtual (so you can record that the acceptance occured) (closes #7457) [ambethia] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that create table with :id => false and fixtures don't play nice ↵David Heinemeier Hansson2007-11-254-1/+22
| | | | | | together (closes #10154) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor Ruby's default calendar reform setting when creating DateTime objects ↵Geoff Buesing2007-11-241-1/+2
| | | | | | via ActiveRecord's Time -> DateTime overflow, Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime. Closes #10201 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add example.log for binary escaping test. References #10176.Jeremy Kemper2007-11-221-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8186 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: correct binary escaping. References #8049, closes #10176 ↵Jeremy Kemper2007-11-221-27/+22
| | | | | | [jbasdf, tmacedo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dynamic finders on association collections respect association :limit. ↵Jeremy Kemper2007-11-212-0/+31
| | | | | | Closes #10227 [Jack Danger Canty] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Dynamic Finders on Association Collections Respect Association :order ↵Michael Koziarski2007-11-212-0/+82
| | | | | | [patrick.t.joyce, technoweenie]. Closes #10211 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_inclusion_of and validates_exclusion_of allow formatted :message ↵Jeremy Kemper2007-11-201-0/+22
| | | | | | strings. Closes #8132 [devrieda, Mike Naberezny] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add 'foxy' support for fixtures of polymorphic associations. Closes #10183 ↵Michael Koziarski2007-11-206-0/+12
| | | | | | [jbarnette, David Lowenfels] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* attr_readonly behaves well with optimistic locking. Closes #10188.Jeremy Kemper2007-11-161-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use rexml for some tests rather than string include? checks to account for ↵Jeremy Kemper2007-11-141-14/+35
| | | | | | unordered attributes. Closes #10164 [Catfish] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base#to_xml supports the nil="true" attribute like Hash#to_xml. Closes #8268.Jeremy Kemper2007-11-142-9/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8138 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix HasManyThrough Association so it uses :conditions on the HasMany ↵Rick Olson2007-11-113-0/+8
| | | | | | Association. Closes #9729 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that column names are quoted. Closes #10134 [wesley.moxam]Michael Koziarski2007-11-102-7/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Kill the whiny_protected_attributes setting and kill the exception raised. ↵David Heinemeier Hansson2007-11-091-18/+0
| | | | | | Instead, just log the mass-assignment misalignment as a debug warning (closes #9966) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Address shortcomings of changeset [8054] [protocool]David Heinemeier Hansson2007-11-072-158/+88
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Escape table names during calculation queries. [wesley.moxam, Koz] Closes #4593Michael Koziarski2007-10-311-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make fixtures work with the new test subclasses. [tarmo, Koz]Michael Koziarski2007-10-312-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce finder :joins with associations. Same :include syntax but with ↵Jeremy Kemper2007-10-291-0/+158
| | | | | | inner rather than outer joins. Closes #10012. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change JSON to encode %w(< > &) as 4 digit hex codes to be in compliance ↵Rick Olson2007-10-291-1/+1
| | | | | | with the JSON spec. Closes #9975 [josh, chuyeow, tpope] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8050 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure that << works on has_many associations on unsaved records. Closes ↵Michael Koziarski2007-10-281-0/+7
| | | | | | #9989 [hasmanyjosh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow association redefinition in subclasses. Closes #9346.Jeremy Kemper2007-10-272-0/+83
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8046 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through delete with custom foreign keys. Closes #6466.Jeremy Kemper2007-10-275-1/+43
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8043 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981.Jeremy Kemper2007-10-2611-3/+166
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow find on a has_many association defined with :finder_sql to accept id ↵Marcel Molina2007-10-263-2/+19
| | | | | | arguments as strings like regular find does. Closes #9916 [krishna] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure that the Schema Dumper supports non-standard primary keys with ↵Michael Koziarski2007-10-251-0/+7
| | | | | | MySQL. Closes #9971 [RubyRedRick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Limited eager loading no longer ignores scoped :order. Closes #9561 [danger, ↵Marcel Molina2007-10-231-0/+9
| | | | | | josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Assigning an instance of a foreign class to a composed_of aggregate calls an ↵Jeremy Kemper2007-10-231-2/+2
| | | | | | optional conversion block. Refactor and simplify composed_of implementation. Closes #6322. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Assigning nil to a composed_of aggregate also sets its immediate value to ↵Jeremy Kemper2007-10-231-0/+15
| | | | | | nil. Closes #9843. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_uniqueness_of behaves well with abstract superclasses. References ↵Jeremy Kemper2007-10-232-0/+51
| | | | | | #3833, closes #9886. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reinstate test_change_column_nullability for all adapters. Closes #9945 ↵Jeremy Kemper2007-10-221-2/+1
| | | | | | [lawrence] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7996 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* test_select_rows shouldn't depend on implicit result ordering. Closes #9898 ↵Jeremy Kemper2007-10-221-2/+2
| | | | | | [lawrence] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that mysql quotes table names with database names correctly. Closes ↵Rick Olson2007-10-201-0/+4
| | | | | | #9911 [crayz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* typo in test nameMichael Koziarski2007-10-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Few more tests for Sexy MigrationsMichael Koziarski2007-10-191-0/+24
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7975 5ecf4fe2-1ee6-0310-87b1-e25e094e27de