aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Delegate access to a customized primary key to the conventional id method. ↵Marcel Molina2005-10-133-2/+6
| | | | | | Closes #2444. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix errors caused by assigning a has-one or belongs-to property to itselfJamis Buck2005-10-134-3/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3581@sedna: jeremy | 2005-10-13 12:20:42 -0700Jeremy Kemper2005-10-131-1/+7
| | | | | | | Preserve order of fixture declarations. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3579@sedna: jeremy | 2005-10-13 12:02:01 -0700Jeremy Kemper2005-10-131-4/+2
| | | | | | | decrease need to edit AR mysql connect details by setting socket to mysql_config --socket. if it doesn't work on your platform, well, you would've had to edit it anyway. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3577@sedna: jeremy | 2005-10-13 11:55:20 -0700Jeremy Kemper2005-10-131-0/+17
| | | | | | | Add in_memory_connection for SQLite3 AR tests. Uses :dbfile => ':memory:' so we don't have to manage db files. It seems a bit quirky, so I'm including it as a separate connection type until we iron out the details. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2556 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support using different database adapters for development and test with ↵Sam Stephenson2005-10-132-0/+11
| | | | | | ActiveRecord::Base.schema_format = :ruby git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimize postgresql selects.Marcel Molina2005-10-132-18/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update DB2 adapter. Closes #2206.Marcel Molina2005-10-123-2/+38
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2546 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Corrections to SQLServer native data types. Closes #2267.Marcel Molina2005-10-122-10/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2545 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated ActiveRecord::Base.threaded_connection in favor of ↵Marcel Molina2005-10-124-8/+21
| | | | | | ActiveRecord::Base.allow_concurrency. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2542 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Protect id attribute from mass assigment even when the primary key is set to ↵Marcel Molina2005-10-123-3/+25
| | | | | | something else. Closes #2438. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add test coverage for customized primary keys including a failing test for ↵Marcel Molina2005-10-1216-6/+65
| | | | | | #2444. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Misc doc fixes (typos/grammar/etc.). Closes #2430.Marcel Molina2005-10-112-37/+39
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add test coverage for content_columns. Closes #2432.Marcel Molina2005-10-112-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2532 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in CHANGELOG.Marcel Molina2005-10-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2531 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up for unthreaded environments. Closes #2431.Marcel Molina2005-10-112-6/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2530 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimization for Mysql selects using mysql-ruby extension greater than ↵Marcel Molina2005-10-112-3/+17
| | | | | | 2.6.3. Closes #2426. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2529 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up the setting of table_name. Closes #2428.Marcel Molina2005-10-104-1/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* move lib/version.rb to lib/active_record/version.rbJamis Buck2005-10-102-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2513 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimize instantiation of STI subclass records. In partial fullfilment of #1236.Marcel Molina2005-10-092-15/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo of 'constrains' to 'contraints'. Closes #2069.Marcel Molina2005-10-093-14/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimization refactoring for add_limit_offset!. In partial fullfilment of #1236.Marcel Molina2005-10-093-9/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add versioning convention from SwitchTower to all Rails components. Add ↵Marcel Molina2005-10-092-1/+11
| | | | | | --version, -v option to the 'rails' command. Closes #1840. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ability to get all siblings, including the current child, with ↵Marcel Molina2005-10-093-1/+17
| | | | | | acts_as_tree. Recloses #2140. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2507 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* PostgreSQL returns the path type wrapped in quotes.Marcel Molina2005-10-092-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add geometric type for postgresql adapter. Closes #2233.Marcel Molina2005-10-095-0/+78
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move require_library_or_gem out of AR's abstract_adapter and into ↵Marcel Molina2005-10-081-23/+0
| | | | | | ActiveSupport. closes #1992 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't tell me about defined reader methods, even at debug level.Jeremy Kemper2005-10-071-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add option (true by default) to generate reader methods for each attribute ↵Marcel Molina2005-10-077-59/+152
| | | | | | of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add convenience predicate methods on Column class. In partial fullfilment of ↵Marcel Molina2005-10-064-8/+34
| | | | | | #1236. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise an exception when invalid options are passed to ↵Marcel Molina2005-10-064-3/+15
| | | | | | ActiveRecord::Base.find. Closes #2363. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* sqlite topics.approved should default to true like the other dbsJeremy Kemper2005-10-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove straggling symbolize_strings_in_hash from [2427].Jeremy Kemper2005-10-062-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixup tests for [2474].Jeremy Kemper2005-10-062-11/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add rename_table to mysql, sqlite and postgres adapters for use in migrationsTobias Lütke2005-10-065-1/+39
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow in memory sqlite DBs when RAILS_ROOT is defined [blair@orcaware.com]Michael Koziarski2005-10-061-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* smallint -> boolean in pg sqlJeremy Kemper2005-10-061-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote booleans according the rules defined by the adapterMichael Koziarski2005-10-067-12/+21
| | | | | | | | | | * SQLite schema has been updated * Postgresql schema needs to be fixed too Simplify AR::Base#toggle to store the boolean, not the quoted value * expand the tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :force option to create_table that'll try to drop the table if it ↵David Heinemeier Hansson2005-10-063-0/+8
| | | | | | already exists before creating git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Schema dumper should emit ":default => false" if the default for a column is ↵Jamis Buck2005-10-051-2/+2
| | | | | | false git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Forced newer versions of RedCloth to use hard breaks [DHH]David Heinemeier Hansson2005-10-021-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Association validation does not belong in a before_save callback: move it ↵Jeremy Kemper2005-10-025-67/+109
| | | | | | into a validation method. Restores the expected model.valid? == model.save. Add tests for cancelling save by returning false from a before_save callback. Remove assumption that before_destroy's return value indicates whether the record was destroyed. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Get rid of old symbolize_strings_in_hash.Jeremy Kemper2005-09-303-18/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2427 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket #2282 - fix parsing of timestamps with time zoneJeremy Kemper2005-09-301-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* No need to string.to_s right after checking that string.is_a?(String)Jeremy Kemper2005-09-301-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move transaction thread-safety test to transactions_test. Check that ↵Jeremy Kemper2005-09-302-47/+79
| | | | | | simultaneous transactions don't step on each others' toes. Check that simultaneous transactions don't give dirty reads (read-committed txn isolation or greater.) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use transactional fixtures by default for AR tests. Set ↵Jeremy Kemper2005-09-301-11/+6
| | | | | | ENV['AR_NO_TX_FIXTURES'] to yes to disable. Tidy up abstract_unit. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Require topic model rather than assume another test has already.Jeremy Kemper2005-09-301-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Disable transactional fixtures for ar_schema_test and schema_test_postgresqlJeremy Kemper2005-09-302-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix broken testcase for transactionsNicholas Seckar2005-09-292-7/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de