David Heinemeier Hansson
1aab0e2c30
Doc fixes #1775 , #1776 [jon@instance-design.co.uk]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 06:27:07 +00:00
David Heinemeier Hansson
dcf5caf596
A bit more work on the still unfinished query cache #1722
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 06:25:32 +00:00
Jamis Buck
d886ad5c8b
Fix acts_as_list such that moving next-to-last item to the bottom does not result in duplicate positions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-20 12:47:55 +00:00
Jamis Buck
83e2f6ae1e
Allow unspecified join-table columns to use to their default values when adding to a habtm collection
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-18 11:06:41 +00:00
David Heinemeier Hansson
9870396ed1
Fixed incompatibility in DB2 adapter with the new limit/offset approach #1718 [Maik Schmidt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 09:52:00 +00:00
David Heinemeier Hansson
6f05696ceb
Added :select option to find which can specify a different value than the 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
2005-07-14 07:18:26 +00:00
David Heinemeier Hansson
5b9b904f14
Added support for limit and offset with eager loading of has_one and 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
2005-07-11 06:09:08 +00:00
David Heinemeier Hansson
c0f84b117c
Fixed that assume_bottom_position (in acts_as_list) could be called on items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1796 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-10 05:31:29 +00:00
David Heinemeier Hansson
60499774c2
Fixed that each request with the WEBrick adapter would open a new database 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
2005-07-10 04:54:34 +00:00
Jeremy Kemper
5495b14a09
r2979@asus: jeremy | 2005-07-10 01:51:00 -0700
...
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
2005-07-10 04:22:08 +00:00
David Heinemeier Hansson
14762fd229
better error message for missing associations #1631 [courtenay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 17:14:14 +00:00
David Heinemeier Hansson
c20713834a
Fixed optimistic locking with SQL Server #1660 [tom@popdog.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 17:02:32 +00:00
David Heinemeier Hansson
14f06c2cc1
Fixed SQL Server test #1678 [Tom Ward]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 16:59:35 +00:00
David Heinemeier Hansson
32a800761e
Made target migrations actually work
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-09 16:28:15 +00:00
David Heinemeier Hansson
47a3bafe26
Added a VERSION parameter to the migrate task that allows you to do "rake 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
2005-07-09 15:46:29 +00:00
David Heinemeier Hansson
2c8ebe4684
Added better error message for "packets out of order" #1630 [courtenay]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-08 19:22:37 +00:00
Jeremy Kemper
78ecfc77a1
r2933@asus: jeremy | 2005-07-08 14:22:58 -0700
...
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
2005-07-08 16:36:35 +00:00
David Heinemeier Hansson
bd832a221b
Fixed first run of "rake migrate" on PostgreSQL by not expecting a return value on the id #1640
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-07 08:48:59 +00:00
David Heinemeier Hansson
169eb781f1
Fixed that Yaml error message in fixtures hid the real error #1623 [Nicholas Seckar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 10:16:38 +00:00
David Heinemeier Hansson
17f7f8a091
Made documentation ready for release (AR)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 10:14:58 +00:00
David Heinemeier Hansson
977b4be208
Changed logging of SQL statements to use the DEBUG level instead of INFO. 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
2005-07-05 17:23:41 +00:00
Jamis Buck
56c3d72aa7
Fix regression from [1631] that caused an attribute to be set to nil if it was assigned false
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 12:38:06 +00:00
David Heinemeier Hansson
0bef168238
Made default changes work in both postgresql and mysql #1612 [Tobias Luetke]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 09:16:23 +00:00
David Heinemeier Hansson
0e92f36d75
Added callbacks on push_with_attributes #1594 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 07:20:24 +00:00
David Heinemeier Hansson
f1880cac58
Sugared up migrations with even more bling #1609 [Tobias Luekte]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 07:19:20 +00:00
David Heinemeier Hansson
4160b518a8
Added new Migrations framework for describing schema transformations in a 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
2005-07-04 18:51:02 +00:00
David Heinemeier Hansson
a43c227f84
Fixed migration initialization of table
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 09:20:43 +00:00
David Heinemeier Hansson
4180e57b70
Added callback hooks to association collections #1549 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 08:43:57 +00:00
David Heinemeier Hansson
55692003d4
Fixed Base.content_columns call for SQL Server adapter #1450 [DeLynn Berry] And a bug with the offset rules
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 12:34:22 +00:00
David Heinemeier Hansson
aaa5637249
Fixed Base#write_attribute to work with both symbols and strings #1190 [Paul Legato]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 09:51:24 +00:00
Jeremy Kemper
e24e2c41c2
Mark ticket # in changelog. Snip some trailing whitespace.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 09:04:52 +00:00
David Heinemeier Hansson
df95128e94
Fixed that has_and_belongs_to_many didn't respect single table inheritance types #1081 [Florian Weber]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:52:59 +00:00
Jeremy Kemper
b210edce38
r1618@asus: jeremy | 2005-07-03 08:24:19 -0700
...
base attribute_present? on blank?, accounting for zero
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:33:03 +00:00
Jeremy Kemper
67adc0b5b3
r1617@asus: jeremy | 2005-07-03 08:23:31 -0700
...
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
2005-07-03 08:32:57 +00:00
Jeremy Kemper
94cd3fd135
r1616@asus: jeremy | 2005-07-03 08:07:13 -0700
...
remove duplicate conditional
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:52 +00:00
Jeremy Kemper
9a10b31fe8
r1615@asus: jeremy | 2005-07-03 08:06:00 -0700
...
oops, back out DELETE typo
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:47 +00:00
Jeremy Kemper
6e39c9e561
r1614@asus: jeremy | 2005-07-03 08:01:08 -0700
...
minor perf tweaks + excise trailing whitespace
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:43 +00:00
Jeremy Kemper
81737fc0dd
r1613@asus: jeremy | 2005-07-03 07:04:53 -0700
...
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
2005-07-03 08:32:39 +00:00
Jeremy Kemper
5bc1e39b35
r1612@asus: jeremy | 2005-07-03 04:35:59 -0700
...
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
2005-07-03 08:32:34 +00:00
Jeremy Kemper
45c4b07f5a
r1611@asus: jeremy | 2005-07-03 04:21:52 -0700
...
No longer pass superfluous connection to AbstractAdapter#log.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:27 +00:00
Jeremy Kemper
f51f12d819
r1610@asus: jeremy | 2005-07-03 00:19:06 -0700
...
remove Column#primary for now
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:22 +00:00
Jeremy Kemper
af9d03824a
r1609@asus: jeremy | 2005-07-03 00:18:43 -0700
...
more minor perf tweaks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:17 +00:00
Jeremy Kemper
397c8ee2a9
r1608@asus: jeremy | 2005-07-03 00:13:57 -0700
...
quoter required for column quoting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:12 +00:00
Jeremy Kemper
b02776c232
r1607@asus: jeremy | 2005-07-02 23:36:52 -0700
...
Rollback MysqlAdapter#select speedup; fix add_limit_offset
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:32:07 +00:00
Jeremy Kemper
018e12da31
r1605@asus: jeremy | 2005-07-02 14:50:23 -0700
...
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
2005-07-03 08:32:02 +00:00
Jeremy Kemper
121b15bfc9
r1604@asus: jeremy | 2005-07-02 14:40:20 -0700
...
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
2005-07-03 08:31:57 +00:00
Jeremy Kemper
96c60b0ec6
r1603@asus: jeremy | 2005-07-02 14:38:52 -0700
...
Faster MysqlAdapter#select.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-03 08:31:14 +00:00
Jeremy Kemper
a250a98a52
r1602@asus: jeremy | 2005-07-02 14:34:00 -0700
...
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
2005-07-03 08:31:09 +00:00
Jeremy Kemper
9ebe33f14b
r1601@asus: jeremy | 2005-07-02 14:33:08 -0700
...
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
2005-07-03 08:27:18 +00:00
David Heinemeier Hansson
d9d22c7596
Fixed that single-table inheritance sub-classes couldn't be used to limit 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
2005-07-03 08:21:22 +00:00