aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
Commit message (Collapse)AuthorAgeFilesLines
* Support using different database adapters for development and test with ↵Sam Stephenson2005-10-131-0/+9
| | | | | | 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-131-18/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update DB2 adapter. Closes #2206.Marcel Molina2005-10-121-2/+35
| | | | 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-121-10/+10
| | | | 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-122-7/+18
| | | | | | 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-121-3/+5
| | | | | | something else. Closes #2438. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Misc doc fixes (typos/grammar/etc.). Closes #2430.Marcel Molina2005-10-111-37/+37
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up for unthreaded environments. Closes #2431.Marcel Molina2005-10-111-5/+17
| | | | 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-111-3/+15
| | | | | | 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-101-1/+7
| | | | 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-101-0/+9
| | | | 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-091-15/+18
| | | | 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-091-13/+17
| | | | 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-092-9/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ability to get all siblings, including the current child, with ↵Marcel Molina2005-10-091-1/+6
| | | | | | 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-091-0/+2
| | | | 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-075-59/+130
| | | | | | 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-062-8/+29
| | | | | | #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-061-1/+7
| | | | | | ActiveRecord::Base.find. Closes #2363. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2481 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
* Add rename_table to mysql, sqlite and postgres adapters for use in migrationsTobias Lütke2005-10-064-1/+20
| | | | 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
* Quote booleans according the rules defined by the adapterMichael Koziarski2005-10-062-4/+8
| | | | | | | | | | * 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-062-0/+6
| | | | | | 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-023-44/+47
| | | | | | 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
* Fix broken testcase for transactionsNicholas Seckar2005-09-291-6/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix transactions so that calling return while inside a transaction will not ↵Nicholas Seckar2005-09-281-4/+7
| | | | | | leave an open transaction on the connection. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make schema definition column lookups agnostic w/r/t/ whether a key or ↵Marcel Molina2005-09-281-2/+2
| | | | | | symbol is passed. Fixes failing test in [2396]. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket #2156 - Use foreign_key inflection uniformlyJeremy Kemper2005-09-281-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3653@asus: jeremy | 2005-09-28 00:23:49 -0700Jeremy Kemper2005-09-282-2/+10
| | | | | | | Ticket 2221 - model.association.clear should destroy associated objects if :dependent => true instead of nullifying their foreign keys git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Returning false in before_destroy should cancel action. Closes #1829.Scott Barron2005-09-281-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to ↵Jeremy Kemper2005-09-271-1/+1
| | | | | | CURRENT_TIMESTAMP/CURRENT_DATE git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extensive documentation to the ActiveRecord::AbstractAdapter. #2250Marcel Molina2005-09-276-38/+210
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oops, swapped order of params to COALESCE! Upcoming patch has test cases.Jeremy Kemper2005-09-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix serialization problem with YAML in 1.8.3Scott Barron2005-09-271-14/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3613@asus: jeremy | 2005-09-26 22:25:04 -0700Jeremy Kemper2005-09-271-2/+2
| | | | | | | Handle sequence reset for empty tables and models with custom primary keys. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3604@asus: jeremy | 2005-09-26 19:10:42 -0700Jeremy Kemper2005-09-261-20/+29
| | | | | | | Treat validates_size_of :within as a single validator rather than splitting it into to ends of the range, thus yield two error messages on nil (yuck) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make update_attribute use the same writer method that update_attributes uses.Marcel Molina2005-09-262-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations honor table name prefixes and suffixes.Marcel Molina2005-09-262-5/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3597@asus: jeremy | 2005-09-26 17:39:23 -0700Jeremy Kemper2005-09-261-5/+5
| | | | | | | Minor improvement to SQLite adapter blob escaping. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3590@asus: jeremy | 2005-09-26 17:00:53 -0700Jeremy Kemper2005-09-261-7/+43
| | | | | | | Correct and optimize PostgreSQL bytea escaping. This is a blend of four patches, each providing a bit to the solution. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3569@asus: jeremy | 2005-09-26 05:33:09 -0700Jeremy Kemper2005-09-261-6/+6
| | | | | | | | | | | Ticket 1749 - reset_sequences workaround for non-integer sequences r3570@asus: jeremy | 2005-09-26 08:30:30 -0700 Fixtures.reset_sequences should only reset sequences corresponding to integer primary keys named id. #1749 r3571@asus: jeremy | 2005-09-26 08:31:11 -0700 Update change log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de