aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Define collection singular ids method for has_many :through associations. ↵Jeremy Kemper2007-06-271-5/+13
| | | | | | Closes #8763. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7137 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Array attribute conditions work with proxied association collections. Closes ↵Jeremy Kemper2007-06-271-1/+5
| | | | | | #8318. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix polymorphic has_one associations declared in an abstract class. Closes ↵Jeremy Kemper2007-06-255-3/+34
| | | | | | #8638. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7119 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed validates_associated should not stop on the first error (closes #4276) ↵David Heinemeier Hansson2007-06-231-4/+6
| | | | | | [mrj/manfred/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mock the beginning of the transaction also. References #8642.Jeremy Kemper2007-06-231-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback if commit raises an exception. Closes #8642.Jeremy Kemper2007-06-231-10/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update tests' use of fixtures for the new collections api. Closes #8726.Jeremy Kemper2007-06-225-122/+55
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Save associated records only if the association is already loaded. Closes #8713.Jeremy Kemper2007-06-211-1/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: fix show_variable. Closes #8448.Jeremy Kemper2007-06-201-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7071 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* remove extra debug line. Closes #8681 [Giles Bowkett]Rick Olson2007-06-181-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7059 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated find_first and find_all.Jeremy Kemper2007-06-114-164/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated push_with_attributes.Jeremy Kemper2007-06-112-182/+129
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix Base#inspect when not every attribute is present. Closes #8623.Jeremy Kemper2007-06-111-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rollback [6961] which breaks SQLite tests. Reference #7345.Jeremy Kemper2007-06-081-16/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote db path so SQLite AR tests work on Windows. Closes #5278 ↵Jeremy Kemper2007-06-082-2/+2
| | | | | | [mislav@nippur.irb.hr] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: raise if a column is duplicated. Closes #7345.Jeremy Kemper2007-06-071-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo. Closes #7504 [aurelianito]Jeremy Kemper2007-06-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: people(:technomancy, :josh) returns both fixtures. Closes #7880.Jeremy Kemper2007-06-052-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Calculations support non-numeric foreign keys. Closes #8154.Jeremy Kemper2007-06-011-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.inspect handles Base itself and abstract_class? Don't use #<Foo ...> ↵Jeremy Kemper2007-05-311-3/+9
| | | | | | since that notation's typically used for instances of a class, not the class itself. Closes #8490 [deepblue] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix an edge case with find with a list of ids, limit, and offset. Closes #8437.Jeremy Kemper2007-05-311-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* with_scope is protected. Closes #8524.Jeremy Kemper2007-05-301-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Calculations: return nil average instead of 0 when there are no rows to ↵Jeremy Kemper2007-05-301-0/+8
| | | | | | average. Closes #8298. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* acts_as_nested_set: direct_children is sorted correctly. Closes #4761.Jeremy Kemper2007-05-302-9/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise an exception if both attr_protected and attr_accessible are declared. ↵Jeremy Kemper2007-05-291-0/+12
| | | | | | Closes #8507, #6004. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Workaround test isolation failure with Task.attr_protected :starting.Jeremy Kemper2007-05-291-1/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite, MySQL, PostgreSQL, Oracle: quote column names in column migration ↵Jeremy Kemper2007-05-291-0/+11
| | | | | | SQL statements. Closes #8466. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]Rick Olson2007-05-281-4/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test that DateTime are quoted as DateTime not Date. Closes #8364 [chas]Jeremy Kemper2007-05-281-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle binary fixtures; pull fixture insertion into the adapters. Closes #7987.Jeremy Kemper2007-05-261-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6859 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find gracefully copes with blank :conditions. Closes #7599.Jeremy Kemper2007-05-261-0/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* validates_numericality_of takes :greater_than, :greater_than_or_equal_to, ↵Jeremy Kemper2007-05-261-1/+65
| | | | | | :equal_to, :less_than, :less_than_or_equal_to, :odd, and :even options. Closes #3952. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: create_database takes :charset and :collation options. Charset ↵Jeremy Kemper2007-05-262-11/+29
| | | | | | defaults to utf8. References #8448. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test that #to_xml takes a block. Closes #8471. [seth]Jeremy Kemper2007-05-251-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Typo in [6845]. References #8437.Jeremy Kemper2007-05-251-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6846 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Find with a list of ids supports limit/offset. Closes #8437.Jeremy Kemper2007-05-251-46/+49
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimistic locking: revert the lock version when an update fails. Closes ↵Jeremy Kemper2007-05-251-0/+14
| | | | | | #7840. Also return the number of affected rows instead of true. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: add_column supports custom column types. Closes #7742. ↵Jeremy Kemper2007-05-251-0/+14
| | | | | | First-patch cheers to jsgarvin\! git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test reconnection after MySQL client timeout. References #428.Jeremy Kemper2007-05-252-2/+32
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include some missing fixtures. Closes #7981.Jeremy Kemper2007-05-252-3/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that associations with :dependent => :delete_all respect :conditions ↵Rick Olson2007-05-242-0/+26
| | | | | | option. Closes #8034 [danger, joshpeek, Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to assignment creates a new proxy rather than modifying its target ↵Jeremy Kemper2007-05-221-1/+14
| | | | | | in-place. Closes #8412. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6804 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot binary fixtureRick Olson2007-05-211-0/+437
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix column type detection while loading fixtures. Closes #7987 [roderickvd]Rick Olson2007-05-211-5/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix #inspect for new records. Closes #8405.Jeremy Kemper2007-05-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pay tribute to timezones. Tune #inspect style.Jeremy Kemper2007-05-181-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sanitize Base#inspect. Closes #8392.Jeremy Kemper2007-05-182-33/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure that the BigDecimal assertions aren't run for sqlite3, which doesn't ↵Michael Koziarski2007-05-181-4/+10
| | | | | | support the precision correctly git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the transaction {|transaction|..} semantics with a new Exception ↵Michael Koziarski2007-05-181-2/+2
| | | | | | ActiveRecord::Rollback. Closes #8030 [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ensure copy table test runs for sqlite and sqlite3. [mislav] Cllosoes #8328Michael Koziarski2007-05-121-3/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6721 5ecf4fe2-1ee6-0310-87b1-e25e094e27de