aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fixed that single-table inheritance sub-classes couldn't be used to limit ↵David Heinemeier Hansson2005-07-031-0/+10
| | | | | | the result set with eager loading #1215 [Chris McGrath] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed validates_numericality_of to work with overrided getter-method when ↵David Heinemeier Hansson2005-07-021-0/+1
| | | | | | :allow_nil is on #1316 [raidel@onemail.at] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clarified intentions of validates_associated #870David Heinemeier Hansson2005-07-021-1/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added roots, root, and siblings to the batch of methods added by ↵David Heinemeier Hansson2005-07-011-1/+18
| | | | | | acts_as_tree #1541 [michael@schuerig.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for ODBC connections to MS SQL Server so you can connect from ↵David Heinemeier Hansson2005-07-014-116/+146
| | | | | | a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry] Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that multiparameter posts ignored attr_protected #1532 ↵David Heinemeier Hansson2005-06-281-3/+3
| | | | | | [alec+rails@veryclever.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated all references to the old find_first and find_all to use the new ↵David Heinemeier Hansson2005-06-267-24/+21
| | | | | | style #1511 [Marcel Molina] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed problem with eager loading when using a has_and_belongs_to_many ↵David Heinemeier Hansson2005-06-261-1/+1
| | | | | | association using :association_foreign_key #1504 [flash@vanklinkenbergsoftware.nl] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#find to honor the documentation on how :joins work and make them ↵David Heinemeier Hansson2005-06-251-4/+6
| | | | | | consistent with Base#count #1405 [pritchie@gmail.com] Improved dynamic finder docs #1495 [laurel@gorgorg.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that validations didn't respecting custom setting for too_short, ↵David Heinemeier Hansson2005-06-251-7/+3
| | | | | | too_long messages #1437 [Marcel Molina] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that clear_association_cache doesn't delete new associations on new ↵David Heinemeier Hansson2005-06-251-1/+1
| | | | | | records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pass association finder arguments through to the association class exactly ↵Jeremy Kemper2005-06-241-1/+3
| | | | | | as we received them. Fixes case where parent.children.find() is interpreted as Child.find([]) instead of Child.find(). git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed docs #856David Heinemeier Hansson2005-06-211-4/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that calling Model.find([]) returns [] and doesn't throw an exception ↵David Heinemeier Hansson2005-06-211-0/+1
| | | | | | #1379 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1471 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed the AR::Recursion module--it broke more code than it fixedJamis Buck2005-06-212-62/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations work with the latest SQLiteDavid Heinemeier Hansson2005-06-211-10/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1458 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that adding a record to a has_and_belongs_to collection would always ↵David Heinemeier Hansson2005-06-181-1/+3
| | | | | | save it -- now it only saves if its a new record #1203 [Alisdair McDiarmid] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1453 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document better #1057David Heinemeier Hansson2005-06-181-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1452 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed saving of in-memory association structures to happen as a ↵David Heinemeier Hansson2005-06-171-1/+5
| | | | | | after_create/after_update callback instead of after_save -- that way you can add new associations in after_create/after_update callbacks without getting them saved twice git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1448 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix quote_bound_value to not map Strings #1416 [htonl]David Heinemeier Hansson2005-06-161-5/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow any Enumerable, not just Array, to work as bind variables #1344 [bitsweat]David Heinemeier Hansson2005-06-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added actual database-changing behavior to collection assigment for has_many ↵David Heinemeier Hansson2005-06-162-4/+30
| | | | | | and has_and_belongs_to_many #1425 [Sebastian Kanthak] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1428 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1307@iwill: jeremy | 2005-06-13 19:05:00 -0700Jeremy Kemper2005-06-131-1/+1
| | | | | | | | | | | | | | | Ticket 1312 - Malformed habtm finder sql r1308@iwill: jeremy | 2005-06-13 19:58:48 -0700 Add a habtm with an unquoted condition to Project. r1309@iwill: jeremy | 2005-06-13 19:59:46 -0700 Space out habtm finder conditions. r1310@iwill: jeremy | 2005-06-13 20:00:16 -0700 Test habtm.find with quoted and unquoted conditions. r1311@iwill: jeremy | 2005-06-13 20:00:25 -0700 Update changelog git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Be sure to use the @finder_sql in the has_many association's #find method, ↵Jamis Buck2005-06-131-2/+4
| | | | | | even if explicit conditions have not been given. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord::Recursion to guard against recursive calls to #saveJamis Buck2005-06-133-1/+63
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1294@iwill: jeremy | 2005-06-13 02:17:42 -0700Jeremy Kemper2005-06-131-1/+3
| | | | | | | | | | | Ticket #1281 r1295@iwill: jeremy | 2005-06-13 02:50:50 -0700 Apply patch, tweak, and test. r1296@iwill: jeremy | 2005-06-13 02:51:04 -0700 Changelog entry. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1410 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1278@iwill: jeremy | 2005-06-12 05:11:48 -0700Jeremy Kemper2005-06-121-50/+62
| | | | | | | | | | | | | | | | | | | | | Branch for PostgreSQL schema. Ticket #827. r1281@iwill: jeremy | 2005-06-12 19:06:43 -0700 remove search_path from PostgreSQL db definition r1282@iwill: jeremy | 2005-06-12 19:07:50 -0700 Rakefile support for database-specific tests. r1283@iwill: jeremy | 2005-06-12 19:10:18 -0700 Add schema_search_path attribute to PostgreSQL adapter. Replace table_structure with column_definitions which finds the given table_name in the schema search path. r1284@iwill: jeremy | 2005-06-12 19:12:10 -0700 Unit test PostgreSQL schema search path. r1285@iwill: jeremy | 2005-06-12 19:12:20 -0700 Changelog entry. r1286@iwill: jeremy | 2005-06-12 20:08:20 -0700 Don't try to quote schema names. Include a reference to the PostgreSQL schema docs. r1287@iwill: jeremy | 2005-06-12 20:16:07 -0700 SchemasTest -> SchemaTest git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1407 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Corrected @@configurations typo. #1410 [david@ruppconsulting.com]Jeremy Kemper2005-06-121-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Return PostgreSQL columns in the order they are declared #1374 ↵Jeremy Kemper2005-06-122-29/+26
| | | | | | (perlguy@gmail.com). Unit test column order, adapter housekeeping, simplify users of columns_hash. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow before/after update hooks to work on models with optimistic lockingJamis Buck2005-06-111-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Do not use instantiated fixtures (in general) in tests. Also, support the ↵Jamis Buck2005-06-101-2/+17
| | | | | | use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes". git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager loading of dependent has_one associations won't delete the association ↵Jamis Buck2005-06-101-1/+1
| | | | | | #1212. Also, starting to refactor the tests to make them speedier, with optional support for transactional fixtures. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sort the migration files explicitly so that they are always ordered correctly.Jamis Buck2005-06-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the in-memory object, but dont orphan the existing oneDavid Heinemeier Hansson2005-06-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a second parameter to the build and create method for has_one that ↵David Heinemeier Hansson2005-06-062-3/+22
| | | | | | controls whether the existing association should be replaced (which means nullifying its foreign key as well). By default this is true, but false can be passed to prevent it. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Using transactional fixtures now causes the data to be loaded only once, for ↵Jamis Buck2005-06-031-2/+8
| | | | | | BIG speed improvements git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixture accessors that can be used when fixture instantiation is ↵Jamis Buck2005-06-031-2/+28
| | | | | | disabled, "model_name(:fixture_name)" git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added note of limitation for #1279David Heinemeier Hansson2005-05-211-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Errors#add_on_blank which works like Errors#add_on_empty, but uses ↵David Heinemeier Hansson2005-05-211-6/+15
| | | | | | Object#blank? instead. CHANGED: validates_presence_of now uses Errors#add_on_blank, which will make " " fail the validation where it didnt before #1309. Added that " " is now also blank? (using strip if available) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the :if option to all validations that can either use a block or a ↵David Heinemeier Hansson2005-05-211-5/+66
| | | | | | method pointer to determine whether the validation should be run or not. #1324 [Duane Johnson/jhosteny] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up timestamping a tad #1227 [skaen]David Heinemeier Hansson2005-05-191-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed use of construct_finder_sql when using :join #1288 [dwlt@dwlt.net]David Heinemeier Hansson2005-05-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that :delete_sql in has_and_belongs_to_many associations couldn't ↵David Heinemeier Hansson2005-05-192-2/+4
| | | | | | access record properties #1299 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1313 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed docs for scaffolding generator #1303 [thijs@vandervossen.net]David Heinemeier Hansson2005-05-191-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that clone would break when an aggregate had the same name as one of ↵David Heinemeier Hansson2005-05-191-12/+25
| | | | | | its attributes #1307 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the callbacks such that observers are notified before the in-object ↵David Heinemeier Hansson2005-05-022-4/+16
| | | | | | callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Started work on a per-request query cacheDavid Heinemeier Hansson2005-05-022-0/+66
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added option for passing an array to the find_all version of the dynamic ↵David Heinemeier Hansson2005-05-021-1/+9
| | | | | | finders and have it evaluated as an IN fragment git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1266 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed association picture referenceDavid Heinemeier Hansson2005-04-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added compatibility with camelCase column names for dynamic finders #533 ↵David Heinemeier Hansson2005-04-301-1/+1
| | | | | | [Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de