Commit Graph

1513 Commits

Author SHA1 Message Date
Jeremy Kemper
5b414190d0 Document deep eager includes. Closes #6267.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-19 22:36:36 +00:00
Jeremy Kemper
c7c867ebd2 Revert [4706] which added incorrect docs. References #5684.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-19 22:15:28 +00:00
Jeremy Kemper
a995b9cde0 Fix #inspect for new records. Closes #8405.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-19 01:35:19 +00:00
Jeremy Kemper
0f2fd5ab51 belongs_to doesn't go :through. Closes #4961.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 21:51:21 +00:00
Jeremy Kemper
57b5fb43ef Correct rdoc link to OracleAdapter. Closes #5289.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 20:49:59 +00:00
Jeremy Kemper
7288fd3e3f Docs: warn that associations names shouldn't be reserved words. Closes #4378.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 19:18:01 +00:00
Jeremy Kemper
39c64fff8a Clarify :offset docs. Closes #3733.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 19:06:54 +00:00
Jeremy Kemper
4d753adeaf Pay tribute to timezones. Tune #inspect style.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 07:24:03 +00:00
Jeremy Kemper
e48b062eed Sanitize Base#inspect. Closes #8392.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 02:11:43 +00:00
Michael Koziarski
45a79034e4 Ensure that the BigDecimal assertions aren't run for sqlite3, which doesn't support the precision correctly
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 01:14:18 +00:00
Michael Koziarski
ebbe4fb0d4 Replace the transaction {|transaction|..} semantics with a new Exception ActiveRecord::Rollback. Closes #8030 [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 01:02:08 +00:00
Jeremy Kemper
9e3a51eb6c Oracle: extract column length for CHAR also. Closes #7866.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-15 19:30:19 +00:00
Michael Koziarski
a722b48000 Ensure copy table test runs for sqlite and sqlite3. [mislav] Cllosoes #8328
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6721 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-12 00:44:50 +00:00
David Heinemeier Hansson
e105e599e7 Sexy dumper now has its groove on (closes #8281) [Chris Wanstrath]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-11 21:26:53 +00:00
Marcel Molina
ca3e89d4de Document :allow_nil option for validates_acceptance_of since it defaults to true. Closes #8050. [tzaharia]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:16:41 +00:00
Marcel Molina
6ad9d1dbde Update documentation for :dependent declaration so that it explicitly uses the non-deprecated API. Closes #8069. [danger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6686 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:14:37 +00:00
Marcel Molina
ee614d6319 Add documentation caveat about when to use count_by_sql. Closes #8090. [fearoffish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:10:19 +00:00
Marcel Molina
15dc567e0f Also add documentation enhancements for increment_counter. Closes #8092. [fearoffish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6684 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:08:05 +00:00
Marcel Molina
5bd35705ca Enhance documentation for decrement_counter. Closes #8093. [fearoffish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:06:26 +00:00
Marcel Molina
194b4aa4f3 Provide brief introduction to what optimistic locking is. Closes #8097. [fearoffish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 05:01:31 +00:00
Marcel Molina
6bdcc0cfaf Add documentation for :encoding option to mysql adapter. Closes #8219 [marclove]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 04:41:45 +00:00
Michael Koziarski
e642368829 Use assert_match instead of String#include? so we can get helpful error messages on failure
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 02:03:46 +00:00
David Heinemeier Hansson
4cbbebb1c3 Added short-hand declaration style to migrations (inspiration from Sexy Migrations, http://errtheblog.com/post/2381) [DHH] Updated resource_scaffold and model generators to use short-hand style migrations [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-06 01:48:19 +00:00
Michael Koziarski
0c960602fe Change Base#to_xml to take the name for a container element for an association from the element name, not the first record's class name. Closes #7004
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-03 02:24:50 +00:00
David Heinemeier Hansson
70ac560e42 Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-28 15:57:29 +00:00
Michael Koziarski
9d08a07c48 Improve Performance of calling create on has_many :through associations by avoiding loading the target collection. Closes #8150 [evan]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-26 00:18:38 +00:00
David Heinemeier Hansson
57352f86d4 Improved performance by relying less on exception raising #8159 [Blaine]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-24 16:58:24 +00:00
David Heinemeier Hansson
52a9e5089c Added ActiveRecord::Base.inspect to return a column-view like #<Post id:integer, title:string, body:text> [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-21 17:35:09 +00:00
David Heinemeier Hansson
635c7f43dd Run with the latest versions so beta gems will work
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-21 17:06:16 +00:00
David Heinemeier Hansson
c2f4681ab4 Added yielding of Builder instance for ActiveRecord::Base#to_xml calls [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-04-13 01:26:17 +00:00
Rick Olson
2a305949d7 documentation project patches, closes #7342, #7319, #7316, #7190 [jeremymcanally]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6470 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-27 14:04:06 +00:00
Rick Olson
4b78a2a245 Add helpful debugging info to the ActiveRecord::StatementInvalid exception in ActiveRecord::ConnectionAdapters::SqliteAdapter#table_structure. Closes #7925. [court3nay]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-27 06:57:53 +00:00
Jeremy Kemper
b5e01f3e4a SQLite: binary escaping works with ='u'. Closes #7862.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6449 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-19 12:49:23 +00:00
Jeremy Kemper
27ba5edef1 Hash#to_xml supports YAML attributes; ActiveRecord::Base#to_xml support serialized attributes. Closes #7502.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6444 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-18 07:30:09 +00:00
Jeremy Kemper
3d5c947155 Fix method visibility bug uncovered by #7854.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-18 03:32:48 +00:00
Jeremy Kemper
a38f28fff1 Base.update_all :order and :limit options. Useful for MySQL updates that must be ordered to avoid violating unique constraints.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6440 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-17 15:48:47 +00:00
Michael Koziarski
f87db851c6 Remove deprecated object transactions. People relying on this functionality should install the object_transactions plugin at http://code.bitsweat.net/svn/object_transactions. Closes #5637 [Koz, Jeremy Kemper]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6439 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-16 22:39:01 +00:00
Michael Koziarski
16b4739e1e Remove special cases for BigDecimal and SQLite, tests pass without them and fail with them.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-16 21:41:09 +00:00
Jeremy Kemper
bcff10adec Fix typo in migration test.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-16 08:26:45 +00:00
Jeremy Kemper
db69c9c12a PostgreSQL: remove DateTime -> Time downcast. Bypass the DateTime migration test on 64-bit platforms since it may be a Time.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6433 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-16 08:25:37 +00:00
Jeremy Kemper
14cc8d2faf find_or_create_by_* takes a hash so you can create with more attributes than are in the method name. Closes #7368.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6420 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-14 01:08:45 +00:00
Michael Koziarski
5bd116ccf4 Make sure with_scope takes both :select and :joins into account when setting :readonly. Allows you to save records you retrieve using finders on a has_many :through associations. [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 09:45:09 +00:00
Rick Olson
42f8e3f611 trim the fat
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 05:38:01 +00:00
Rick Olson
e3dab67c44 Allow a polymorphic :source for has_many :through associations. Closes #7143 [protocool]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 05:23:18 +00:00
Rick Olson
b7107d070a forgot to add tests for #7044
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 05:16:22 +00:00
Jeremy Kemper
9c0fe36d46 Credit Dan by name rather than nick.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 02:16:27 +00:00
Jeremy Kemper
07d8f46b85 Consistent public/protected/private visibility for chained methods. Closes #7813.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-13 02:14:31 +00:00
Jeremy Kemper
bedb879913 Oracle: fix quoted primary keys and datetime overflow. Closes #7798.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-12 05:44:01 +00:00
Jeremy Kemper
be408bd4c6 Fix @logger.debug? conditional considering @logger may be nil.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-11 12:30:28 +00:00
Jeremy Kemper
98165fd31e Consistently quote primary key column names. Closes #7763.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6364 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 03:23:37 +00:00