Commit Graph

523 Commits

Author SHA1 Message Date
Jamis Buck
7d65f7cd3d Revert [2040], caused assignment of belongs_to associations to fail in some cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2048 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-24 16:45:46 +00:00
Jamis Buck
943fde0a55 Add a failing test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-24 16:25:56 +00:00
Jamis Buck
dfe1aeb776 Saving a record with two unsaved belongs_to associations pointing to the same object fails #2023 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-23 11:05:04 +00:00
Jamis Buck
639d03bbb7 Update changelog
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2012 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-14 08:59:18 +00:00
Jamis Buck
b1a4f91a58 Make destroy return self #1913 [sebastian.kanthak@muehlheim.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-14 08:58:53 +00:00
Jamis Buck
73594d88f3 Fix typo in validations documentation #1938 [court3nay]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-14 08:50:51 +00:00
Jamis Buck
85c603fc9e Make acts_as_list work for insert_at(1) #1966 [hensleyl@papermountain.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-14 08:35:08 +00:00
Jamis Buck
e17bf81823 Fix typo in count_by_sql documentation #1969 [Alexey Verkhovsky]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-14 08:20:51 +00:00
Jamis Buck
da874a4af8 Allow add_column and create_table to specify NOT NULL #1712 [emptysands@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-30 10:16:21 +00:00
Jamis Buck
369d054338 Fix create_table so that id column is implicitly added [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-27 17:06:22 +00:00
David Heinemeier Hansson
14ea312808 Made Oracle a first-class connection adapter by adhering closer to idiomatic Oracle style #1798 [The Gang of Oracles]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-24 14:01:35 +00:00
David Heinemeier Hansson
d41ee82ebc Added warning about relying on habtm table aliases etc
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 20:40:27 +00:00
David Heinemeier Hansson
eb10742581 Dont be ambigious about the condition key
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 20:22:55 +00:00
David Heinemeier Hansson
34f9d30e39 Added support for calling constrained class methods on has_many and has_and_belongs_to_many collections #1764 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 20:05:42 +00:00
David Heinemeier Hansson
ea8f3f0a37 Added migration support for SQLite (using temporary tables to simulate ALTER TABLE) #1771 [Sam Stephenson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 19:58:03 +00:00
Nicholas Seckar
2cdc2a0d30 Remove extra definition of supports_migrations? from abstract_adaptor.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 16:52:59 +00:00
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
6baedb0936 Make all tests pass on PGSQL #1759 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 09:17:50 +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
4259199c2c Made ready for release of 0.13.1
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1814 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-11 07:36:18 +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
e008bfd2d8 r2985@asus: jeremy | 2005-07-10 02:04:41 -0700
Updated changelog for #1688.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-10 04:25:39 +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
a0d31fcd81 Pegged the versions for release
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 12:48:14 +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
Jeremy Kemper
2418a68aa2 Simplify aaa_create_tables_test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 05:08:24 +00:00
Jeremy Kemper
c1efa54195 Include all tables in mysql, sqlite, and postgresql drop sql.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 05:07:49 +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
ab416b4dde Make postgres8 ar tests work #1601 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 17:16:18 +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