aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Sexy dumper now has its groove on (closes #8281) [Chris Wanstrath]David Heinemeier Hansson2007-05-111-4/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assert_match instead of String#include? so we can get helpful error ↵Michael Koziarski2007-05-061-1/+3
| | | | | | messages on failure git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Base#to_xml to take the name for a container element for an ↵Michael Koziarski2007-05-031-1/+8
| | | | | | association from the element name, not the first record's class name. Closes #7004 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug ↵David Heinemeier Hansson2007-04-281-2/+0
| | | | | | by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve Performance of calling create on has_many :through associations by ↵Michael Koziarski2007-04-261-2/+14
| | | | | | avoiding loading the target collection. Closes #8150 [evan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH]David Heinemeier Hansson2007-04-131-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support ↵Jeremy Kemper2007-03-182-7/+18
| | | | | | serialized attributes. Closes #7502. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base.update_all :order and :limit options. Useful for MySQL updates that ↵Jeremy Kemper2007-03-171-0/+6
| | | | | | must be ordered to avoid violating unique constraints. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove deprecated object transactions. People relying on this functionality ↵Michael Koziarski2007-03-161-20/+0
| | | | | | should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove special cases for BigDecimal and SQLite, tests pass without them and ↵Michael Koziarski2007-03-161-9/+3
| | | | | | | | | fail with them. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in migration test.Jeremy Kemper2007-03-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration ↵Jeremy Kemper2007-03-161-4/+6
| | | | | | test on 64-bit platforms since it may be a Time. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* find_or_create_by_* takes a hash so you can create with more attributes than ↵Jeremy Kemper2007-03-141-0/+19
| | | | | | are in the method name. Closes #7368. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure with_scope takes both :select and :joins into account when setting ↵Michael Koziarski2007-03-131-0/+10
| | | | | | :readonly. Allows you to save records you retrieve using finders on a has_many :through associations. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow a polymorphic :source for has_many :through associations. Closes ↵Rick Olson2007-03-132-0/+14
| | | | | | #7143 [protocool] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* forgot to add tests for #7044Rick Olson2007-03-131-0/+145
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Consistently quote primary key column names. Closes #7763.Jeremy Kemper2007-03-0922-1/+99
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: fix YAML ordered map support. Closes #2665.Jeremy Kemper2007-03-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de