Commit Graph

1245 Commits

Author SHA1 Message Date
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
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
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
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
Jeremy Kemper
49d1f6a813 Fixtures: fix YAML ordered map support. Closes #2665.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 02:06:50 +00:00
Jeremy Kemper
866cba7bb7 DateTimes assume the default timezone. Closes #7764.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-09 00:34:17 +00:00
Jeremy Kemper
c59bce8596 Fix typo. References #7727, closes #7762.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-08 12:11:51 +00:00
Jeremy Kemper
e0cded2bbf Sybase: hide timestamp columns since they're inherently read-only. Closes #7716.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-06 09:43:28 +00:00
Jeremy Kemper
7b9824f6e2 Oracle: overflow Time to DateTime. Closes #7718.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-06 09:39:50 +00:00
Jeremy Kemper
1e9e198cc5 Note that find results may not be in the same order as the id arguments. Closes #7719.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-06 09:33:08 +00:00
Jeremy Kemper
821f2d58a7 PostgreSQL: don't use async_exec and async_query with postgres-pr. Closes #7727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-06 09:27:54 +00:00
Jeremy Kemper
d1b08f4a75 Fix an edge case with dates during the Italian calendar reform! Hehe. Closes #7724.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-06 00:49:11 +00:00
Jeremy Kemper
0e8c3b8dd9 Fix has_many :through << with custom foreign keys. Closes #6466, #7153.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6336 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-05 11:34:39 +00:00
Marcel Molina
bda4009aee Fix typo in validations documentation. Closes #7669. [ee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 18:49:43 +00:00
Jeremy Kemper
b2c0359b3e SQLServer: recognize real column type as Ruby float, correctly schema-dump tables with no indexes or descending indexes. References #7057, #7703. Closes #7333.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6297 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-03-03 14:20:57 +00:00
Jeremy Kemper
9ea68721ac mysql.rb ignores IOError in finalizer when socket is already closed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-26 21:40:50 +00:00
David Heinemeier Hansson
23e24c5996 Setting fixtures automatically for integration tests is a bit harder -- will have to wait until the test superclass reform is implemented
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 19:27:56 +00:00
David Heinemeier Hansson
87b7b5b3e7 Added fixtures :all to test_helper.rb to assume that most people just want all their fixtures loaded all the time [DHH] Added fixtures :all as a way of loading all fixtures in the fixture directory at once (closes #7214) [manfred]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-25 17:31:43 +00:00
Jeremy Kemper
f2fb711152 Ruby 1.8.6 compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 11:00:06 +00:00
Jeremy Kemper
f425bba9cf Use the query cache iff Active Record is configured.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 08:14:47 +00:00
David Heinemeier Hansson
25bb98e42d Added database connection as a yield parameter to ActiveRecord::Base.transaction so you can manually rollback [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 22:13:39 +00:00
Tobias Lütke
7842caed94 Fixed query cache when multiple database connections were involved
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 21:54:41 +00:00
Tobias Lütke
2ffbc6115e Enable active record cache automatically for all actions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 18:08:39 +00:00
Tobias Lütke
b5419cd66e You can now use cache in instance hierachies. This allows ActiveRecord::Base.cache { } usage to cache everything
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-20 23:42:04 +00:00
Jamis Buck
83752373b9 Made increment_counter/decrement_counter play nicely with optimistic locking, and added a more general update_counters method
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-07 16:10:40 +00:00