aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to ↵Jeremy Kemper2005-09-272-16/+23
| | | | | | CURRENT_TIMESTAMP/CURRENT_DATE git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix serialization problem with YAML in 1.8.3Scott Barron2005-09-271-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3603@asus: jeremy | 2005-09-26 19:10:00 -0700Jeremy Kemper2005-09-261-5/+10
| | | | | | | Add unit tests for nil assigned to validates_size_of :attr, :within git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations honor table name prefixes and suffixes.Marcel Molina2005-09-261-2/+53
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3591@asus: jeremy | 2005-09-26 17:01:30 -0700Jeremy Kemper2005-09-261-43/+22
| | | | | | | Simplify binary unit test. Use flowers.jpg instead of associations.png git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3589@asus: jeremy | 2005-09-26 16:58:40 -0700Jeremy Kemper2005-09-262-0/+0
| | | | | | | Remove associations.png in favor of flower.jpg which reveals a bug in binary escaping. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include the orders table in *.drop.sqlJeremy Kemper2005-09-266-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Standardize the interpretation of boolean columns in the Mysql and Sqlite ↵Jamis Buck2005-09-252-2/+25
| | | | | | adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assignment instead of callDavid Heinemeier Hansson2005-09-251-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new symbol-driven approach to activating observers with Base#observer ↵David Heinemeier Hansson2005-09-251-2/+2
| | | | | | [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrap :conditions in parentheses to prevent problems with OR's #1871Jamis Buck2005-09-244-9/+35
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added AbstractAdapter#select_value and AbstractAdapter#select_values as ↵David Heinemeier Hansson2005-09-241-0/+13
| | | | | | convenience methods for selecting single values, instead of hashes, of the first column in a SELECT #2283 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sqlite adapter pass all testsJamis Buck2005-09-231-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveRecord::SchemaDumper for dumping a DB schema to a pure-ruby file, ↵Jamis Buck2005-09-234-0/+92
| | | | | | making it easier to consolidate large migration lists and port database schemas between databases. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the create_x method from belongs_to wouldn't save the association ↵David Heinemeier Hansson2005-09-201-0/+3
| | | | | | properly #2042 [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed saving a record with two unsaved belongs_to associations pointing to ↵Jamis Buck2005-09-201-0/+45
| | | | | | the same object #2023 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Observers didn't observe sub-classes #627 [Florian Weber]David Heinemeier Hansson2005-09-191-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager loading error messages, allow :include to specify tables using ↵Nicholas Seckar2005-09-181-0/+10
| | | | | | strings or symbols. Closes #2222 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed various problems with has_and_belongs_to_many when using customer ↵David Heinemeier Hansson2005-09-132-0/+14
| | | | | | finder_sql #2094 [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rolled back broken #1814David Heinemeier Hansson2005-09-111-14/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added better exception error when unknown column types are used with ↵David Heinemeier Hansson2005-09-111-0/+14
| | | | | | migrations #1814 [fbeausoleil@ftml.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix testsDavid Heinemeier Hansson2005-09-111-19/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix fixture problem for pgsqlDavid Heinemeier Hansson2005-09-111-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed comparison of Active Record objects so two new objects are not equal ↵David Heinemeier Hansson2005-09-091-0/+4
| | | | | | #2099 [deberg] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the SQL Server adapter would sometimes return DBI::Timestamp ↵David Heinemeier Hansson2005-09-091-4/+4
| | | | | | objects instead of Time #2127 [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the test_find_all_by_one_attribute and ↵David Heinemeier Hansson2005-09-091-1/+1
| | | | | | test_find_all_by_one_attribute_with_options tests not fail in SQL Server #2128 [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored away all the legacy validate_options calls and replaced them with ↵David Heinemeier Hansson2005-09-093-2/+21
| | | | | | Hash#assert_valid_keys git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the instance methods #root and #ancestors on acts_as_tree and fixed ↵David Heinemeier Hansson2005-09-092-3/+39
| | | | | | siblings to not include the current node #2142, #2140 [coffee2code] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures ignore table name prefix and suffix #1987 [Jakob S]Jamis Buck2005-09-021-0/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Modify read_attribute to allow a symbol argument #2024 [Ken Kunz]Jamis Buck2005-09-021-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert [2040], caused assignment of belongs_to associations to fail in some ↵Jamis Buck2005-08-241-6/+17
| | | | | | cases git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2048 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add a failing testJamis Buck2005-08-241-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Saving a record with two unsaved belongs_to associations pointing to the ↵Jamis Buck2005-08-238-1/+96
| | | | | | same object fails #2023 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make destroy return self #1913 [sebastian.kanthak@muehlheim.de]Jamis Buck2005-08-141-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make acts_as_list work for insert_at(1) #1966 [hensleyl@papermountain.org]Jamis Buck2005-08-141-0/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow add_column and create_table to specify NOT NULL #1712 ↵Jamis Buck2005-07-301-0/+25
| | | | | | [emptysands@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix create_table so that id column is implicitly added [Rick Olson]Jamis Buck2005-07-271-1/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made Oracle a first-class connection adapter by adhering closer to idiomatic ↵David Heinemeier Hansson2005-07-248-12/+90
| | | | | | Oracle style #1798 [The Gang of Oracles] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for calling constrained class methods on has_many and ↵David Heinemeier Hansson2005-07-224-3/+174
| | | | | | has_and_belongs_to_many collections #1764 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support for SQLite (using temporary tables to simulate ALTER ↵David Heinemeier Hansson2005-07-221-0/+64
| | | | | | TABLE) #1771 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix acts_as_list such that moving next-to-last item to the bottom does not ↵Jamis Buck2005-07-201-0/+16
| | | | | | result in duplicate positions git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow unspecified join-table columns to use to their default values when ↵Jamis Buck2005-07-187-6/+32
| | | | | | adding to a habtm collection git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed incompatibility in DB2 adapter with the new limit/offset approach ↵David Heinemeier Hansson2005-07-172-1/+3
| | | | | | #1718 [Maik Schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make all tests pass on PGSQL #1759 [Rick Olson]David Heinemeier Hansson2005-07-171-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :select option to find which can specify a different value than the ↵David Heinemeier Hansson2005-07-141-0/+4
| | | | | | default *, like find(:all, :select => "first_name, last_name"), if you either only want to select part of the columns or exclude columns otherwise included from a join #1338 [Stefan Kaes] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for limit and offset with eager loading of has_one and ↵David Heinemeier Hansson2005-07-111-2/+43
| | | | | | belongs_to associations. Using the options with has_many and has_and_belongs_to_many associations will now raise an ActiveRecord::ConfigurationError #1692 [Rick Olsen] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that each request with the WEBrick adapter would open a new database ↵David Heinemeier Hansson2005-07-101-0/+34
| | | | | | connection #1685 [Sam Stephenson]. Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1792 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2979@asus: jeremy | 2005-07-10 01:51:00 -0700Jeremy Kemper2005-07-102-23/+30
| | | | | | | | | | | | | Split association reflection test into has_many and has_one tests. TODO: extend to belongs_to and habtm as well. Kill trailing whitespace. r2980@asus: jeremy | 2005-07-10 01:53:41 -0700 Test that eager load of firm.account (a has_one) returns the correct account. This doesn't cover the regression in Ticket #1688, however. Need a case where class name is not provided and the singular name is over-singularized by active_record.class_name. Kill trailing whitespace. r2981@asus: jeremy | 2005-07-10 01:56:44 -0700 Fix class name resolution in AssociationReflection#name_to_class_name. Use the equivalent of the idiomatic ||= (read or write if nil) for the class_inheritable_attribute reflection arrays. Kill trailing whitespace. r2982@asus: jeremy | 2005-07-10 01:59:08 -0700 Remove superfluous assignment in compute_type. In an inject, the return value is used for the next injection, so assigning to the injected value is unnecessary. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* better error message for missing associations #1631 [courtenay]David Heinemeier Hansson2005-07-091-0/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a VERSION parameter to the migrate task that allows you to do "rake ↵David Heinemeier Hansson2005-07-091-0/+15
| | | | | | migrate VERSION=34" to migrate to the 34th version traveling up or down depending on the current version. Added ActiveRecord::Migrator.migrate that can figure out whether to go up or down based on the target version and the current git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1780 5ecf4fe2-1ee6-0310-87b1-e25e094e27de