aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
Commit message (Collapse)AuthorAgeFilesLines
* Fixed that each request with the WEBrick adapter would open a new database ↵David Heinemeier Hansson2005-07-103-8/+18
| | | | | | 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-31/+33
| | | | | | | | | | | | | 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-4/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed optimistic locking with SQL Server #1660 [tom@popdog.net]David Heinemeier Hansson2005-07-091-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed SQL Server test #1678 [Tom Ward]David Heinemeier Hansson2005-07-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made target migrations actually workDavid Heinemeier Hansson2005-07-091-3/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1781 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/+23
| | | | | | 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
* Added better error message for "packets out of order" #1630 [courtenay]David Heinemeier Hansson2005-07-081-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2933@asus: jeremy | 2005-07-08 14:22:58 -0700Jeremy Kemper2005-07-081-0/+9
| | | | | | | Don't call GC.start in Mysql::Result#free. Performance killer. This should go upstream.. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed first run of "rake migrate" on PostgreSQL by not expecting a return ↵David Heinemeier Hansson2005-07-071-1/+1
| | | | | | value on the id #1640 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas ↵David Heinemeier Hansson2005-07-061-1/+1
| | | | | | Seckar] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made documentation ready for release (AR)David Heinemeier Hansson2005-07-063-47/+45
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed logging of SQL statements to use the DEBUG level instead of INFO. ↵David Heinemeier Hansson2005-07-051-1/+1
| | | | | | Added logging of the request URI in the benchmark statement (makes it easy to grep for slow actions). Changed the default logging level in config/environment.rb to INFO for production (so SQL statements won't be logged) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1714 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix regression from [1631] that caused an attribute to be set to nil if it ↵Jamis Buck2005-07-051-1/+1
| | | | | | was assigned false git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made default changes work in both postgresql and mysql #1612 [Tobias Luetke]David Heinemeier Hansson2005-07-053-6/+21
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added callbacks on push_with_attributes #1594 [Florian Weber]David Heinemeier Hansson2005-07-051-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sugared up migrations with even more bling #1609 [Tobias Luekte]David Heinemeier Hansson2005-07-054-27/+119
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new Migrations framework for describing schema transformations in a ↵David Heinemeier Hansson2005-07-044-8/+139
| | | | | | way that can be easily applied across multiple databases #1604 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed migration initialization of tableDavid Heinemeier Hansson2005-07-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added callback hooks to association collections #1549 [Florian Weber]David Heinemeier Hansson2005-07-042-5/+74
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base.content_columns call for SQL Server adapter #1450 [DeLynn Berry] ↵David Heinemeier Hansson2005-07-031-1/+5
| | | | | | And a bug with the offset rules git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#write_attribute to work with both symbols and strings #1190 [Paul ↵David Heinemeier Hansson2005-07-031-1/+1
| | | | | | Legato] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mark ticket # in changelog. Snip some trailing whitespace.Jeremy Kemper2005-07-031-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_and_belongs_to_many didn't respect single table inheritance ↵David Heinemeier Hansson2005-07-031-0/+9
| | | | | | types #1081 [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1618@asus: jeremy | 2005-07-03 08:24:19 -0700Jeremy Kemper2005-07-031-2/+2
| | | | | | | base attribute_present? on blank?, accounting for zero git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1617@asus: jeremy | 2005-07-03 08:23:31 -0700Jeremy Kemper2005-07-031-29/+27
| | | | | | | settle on the 'slow' MysqlAdapter#select since it means fewer comparisons later. strip trailing whitespace. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1616@asus: jeremy | 2005-07-03 08:07:13 -0700Jeremy Kemper2005-07-031-1/+1
| | | | | | | remove duplicate conditional git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1615@asus: jeremy | 2005-07-03 08:06:00 -0700Jeremy Kemper2005-07-031-5/+4
| | | | | | | oops, back out DELETE typo git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1614@asus: jeremy | 2005-07-03 08:01:08 -0700Jeremy Kemper2005-07-031-144/+142
| | | | | | | minor perf tweaks + excise trailing whitespace git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1613@asus: jeremy | 2005-07-03 07:04:53 -0700Jeremy Kemper2005-07-031-64/+59
| | | | | | | optimize method_missing for common case (read_attribute). minor perf tweaks git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1631 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1612@asus: jeremy | 2005-07-03 04:35:59 -0700Jeremy Kemper2005-07-031-5/+3
| | | | | | | don't include Benchmark into AbstractAdapter directly. call Benchmark.realtime instead of bm = Benchmark.measure, bm.real git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1611@asus: jeremy | 2005-07-03 04:21:52 -0700Jeremy Kemper2005-07-035-46/+41
| | | | | | | No longer pass superfluous connection to AbstractAdapter#log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1610@asus: jeremy | 2005-07-03 00:19:06 -0700Jeremy Kemper2005-07-031-2/+0
| | | | | | | remove Column#primary for now git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1609@asus: jeremy | 2005-07-03 00:18:43 -0700Jeremy Kemper2005-07-031-4/+9
| | | | | | | more minor perf tweaks git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1608@asus: jeremy | 2005-07-03 00:13:57 -0700Jeremy Kemper2005-07-031-7/+9
| | | | | | | quoter required for column quoting git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1607@asus: jeremy | 2005-07-02 23:36:52 -0700Jeremy Kemper2005-07-032-8/+8
| | | | | | | Rollback MysqlAdapter#select speedup; fix add_limit_offset git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1605@asus: jeremy | 2005-07-02 14:50:23 -0700Jeremy Kemper2005-07-031-8/+9
| | | | | | | And take it out again.. passing around the quoter doesn't make sense any more because we're calling quote_column_name, not the generic quote method. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1604@asus: jeremy | 2005-07-02 14:40:20 -0700Jeremy Kemper2005-07-031-1/+1
| | | | | | | Bring the column_quoter arg back to locking.rb. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1603@asus: jeremy | 2005-07-02 14:38:52 -0700Jeremy Kemper2005-07-036-85/+86
| | | | | | | Faster MysqlAdapter#select. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1602@asus: jeremy | 2005-07-02 14:34:00 -0700Jeremy Kemper2005-07-031-2/+2
| | | | | | | Don't pass connection to quoted_comma_pair_list git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1621 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r1601@asus: jeremy | 2005-07-02 14:33:08 -0700Jeremy Kemper2005-07-031-11/+8
| | | | | | | Only notify observers of after_find and after_initialize if these methods are defined on the model. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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