Jeremy Kemper
a3f459eecf
Firebird migrations support. Closes #5337 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 17:13:21 +00:00
Jeremy Kemper
338defb48c
Respect type method. #5337
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 17:10:29 +00:00
Jeremy Kemper
80b5331c0f
Rollback [4584], bad test. Reopens #3819 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 01:09:23 +00:00
Jeremy Kemper
1060fe2d72
Update callbacks documentation. Closes #3970 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 00:52:37 +00:00
Jeremy Kemper
7767e33b43
Don't modify options parameters in-place. Closes #3819 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 00:38:06 +00:00
Jeremy Kemper
3080b273a8
PostgreSQL: correctly quote the ' in pk_and_sequence_for. Closes #5462 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 21:19:27 +00:00
Jeremy Kemper
c4233a0eae
PostgreSQL: correctly quote microseconds in timestamps. Closes #5641 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 17:40:22 +00:00
Jeremy Kemper
230c5a060b
find_one uses find_every.first instead of find_initial since its primary key constraint obviates find_initial's :limit => 1. References #5635 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 17:34:45 +00:00
Jeremy Kemper
69d8ca4c52
Clearer has_one/belongs_to model names (account has_one :user). Closes #5632 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:58:22 +00:00
Jeremy Kemper
044f960fd3
PostgreSQL: add_column can add a not null column with a default.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:46:53 +00:00
Jeremy Kemper
40bdbba48d
Oracle: use nonblocking queries if allow_concurrency is set, fix pessimistic locking, don't guess date vs. time by default (set OracleAdapter.emulate_dates = true for the old behavior), adapter cleanup. Closes #5635 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:42:14 +00:00
Jeremy Kemper
63375b9ef2
Grammar fix in aggregations rdoc. Closes #5613 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-06 02:05:09 +00:00
Rick Olson
c51f9fdc78
revert ActiveRecord equality change. Closes #5596
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 14:22:24 +00:00
David Heinemeier Hansson
784165e03b
Fixed a few Oracle issues: Allows Oracle's odd date handling to still work consistently within #to_xml, Passes test that hardcode insert statement by dropping the :id column, Updated RUNNING_UNIT_TESTS with Oracle instructions, Corrects method signature for #exec #5294 [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:54:19 +00:00
David Heinemeier Hansson
e8504877c0
Doc fixes ( closes #5443 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:44:26 +00:00
David Heinemeier Hansson
b272100f05
Doc fix ( closes #5504 ) [lee@omara.ca]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:43:47 +00:00
David Heinemeier Hansson
f384622a20
Doc fixes
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4538 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:06:51 +00:00
Nicholas Seckar
66313f77ca
Minor tweak to improve performance of ActiveRecord::Base#to_param
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4531 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-03 03:57:31 +00:00
Jeremy Kemper
6a1a1e5536
r4738@asus: jeremy | 2006-06-29 20:18:43 -0700
...
Observers also watch subclasses created after they are declared. Closes #5535 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-30 04:38:24 +00:00
Jeremy Kemper
5fe64dd1a6
r4724@asus: jeremy | 2006-06-28 19:22:46 -0700
...
Removed deprecated timestamps_gmt class methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4511 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 02:39:32 +00:00
Jeremy Kemper
5b866f75a7
r4720@asus: jeremy | 2006-06-28 18:12:57 -0700
...
Don't be such a hardass. References #5497 .
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 01:13:55 +00:00
Jeremy Kemper
ce458a74a5
Don't assume Active Record is available. Closes #5497 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-28 23:51:50 +00:00
Jeremy Kemper
42775686d2
PostgreSQL: support microsecond time resolution. Closes #5492 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 18:04:06 +00:00
Nicholas Seckar
d9125093e8
Add AssociationCollection#sum since the method_missing invokation has been shadowed by Enumerable#sum. Closes #5500 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-25 17:49:24 +00:00
Jeremy Kemper
b91e6aa68d
Get there
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4484 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-21 23:15:03 +00:00
Jeremy Kemper
d399ee9332
preserve chained method punctuation
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-21 23:09:01 +00:00
Jeremy Kemper
38d1a4aa09
alias_method_chain preserves method punctuation so foo, foo?, and foo! may be chained with the same feature.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-21 20:40:14 +00:00
Rick Olson
53924078d0
Don't use keywords as local vars in documentation. Closes #5291 . [jeremy@planetargon.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-21 02:17:48 +00:00
Sam Stephenson
d19e46421c
Added find_or_initialize_by_X which works like find_or_create_by_X but doesn't save the newly instantiated record
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4473 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 22:48:52 +00:00
Jeremy Kemper
722e0b6a8b
r4664@asus: jeremy | 2006-06-19 18:55:36 -0700
...
Use the #lock method to obtain a row lock on a single record. Simply reloads the record with :lock => true.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4462 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 01:58:36 +00:00
Jeremy Kemper
e4254939aa
r4663@asus: jeremy | 2006-06-19 17:23:57 -0700
...
ActiveRecord::Locking is now ActiveRecord::Locking::Optimistic (to make way for Pessimistic.)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 01:58:27 +00:00
Jeremy Kemper
15aa6e0552
r4644@asus: jeremy | 2006-06-16 14:57:03 -0700
...
locking
r4645@asus: jeremy | 2006-06-17 12:41:30 -0700
missing reply fixture
r4646@asus: jeremy | 2006-06-19 13:05:23 -0700
Use a per-thread (rather than global) transaction mutex so you may execute concurrent transactions on separate connections.
r4647@asus: jeremy | 2006-06-19 13:07:23 -0700
PostgreSQL: introduce allow_concurrency option which determines whether to use blocking or asynchronous #execute. Adapters with blocking #execute will deadlock Ruby threads. The default value is ActiveRecord::Base.allow_concurrency.
r4648@asus: jeremy | 2006-06-19 13:08:40 -0700
Pass the default allow_concurrency when instantiating new connections.
r4649@asus: jeremy | 2006-06-19 13:11:12 -0700
Break out concurrent transaction tests and run them for PostgreSQLAdapter only (need to fork or system('some_test_script') for the other adapters)
r4650@asus: jeremy | 2006-06-19 13:42:48 -0700
Row locking. Provide a locking clause with the :lock finder option or true for the default "FOR UPDATE".
r4661@asus: jeremy | 2006-06-19 15:36:51 -0700
excise the junk mutex
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4460 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-19 22:48:51 +00:00
Nicholas Seckar
e5fc5aaffe
Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-19 16:45:34 +00:00
Jamis Buck
f97978ad91
Use explicit delegation instead of method aliasing for AR::Base.to_param -> AR::Base.id. ( closes #5299 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-05 15:41:24 +00:00
David Heinemeier Hansson
2e65e8ccc6
Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-04 00:33:52 +00:00
David Heinemeier Hansson
c5ec16e583
Added simple hash conditions to find that'll just convert hash to an AND-based condition string ( closes #5143 ) [hcatlin@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 22:15:06 +00:00
David Heinemeier Hansson
cb62f06dcf
Fixed issues with BLOB limits, charsets, and booleans for Firebird ( closes #5194 , #5191 , #5189 ) [kennethkunz@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4424 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:57:03 +00:00
David Heinemeier Hansson
d016d9a6d4
Fixed usage of :limit and with_scope when the association in scope is a 1:m ( closes #5208 ) [alex@purefiction.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:51:57 +00:00
David Heinemeier Hansson
2fbcae1912
Added disconnect! to Firebird adapter ( closes #5210 ) [kennethkunz@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4421 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:48:30 +00:00
David Heinemeier Hansson
7f00f51239
Fixed migration trouble with SQLite when NOT NULL is used in the new definition ( closes #5215 ) [greg@lapcominc.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4419 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:41:40 +00:00
David Heinemeier Hansson
3e67e0b3b2
Fixed problems with eager loading and counting on SQL Server ( closed #5212 ) [kajism@yahoo.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:27:16 +00:00
David Heinemeier Hansson
4394e402b7
Fixed that count distinct should use the selected column even when using :include ( closes #5251 ) [anna@wota.jp]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:19:36 +00:00
David Heinemeier Hansson
1671609063
Fixed that has_many.create ended up with duplicate objects ( closes #5250 ) [daniel@nouvelles-solutions.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:16:50 +00:00
David Heinemeier Hansson
01a52dd1ad
Fixed that :includes merged from with_scope won't cause the same association to be loaded more than once if repetition occurs in the clauses ( closes #5253 ) [alex@purefiction.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 21:11:48 +00:00
Jeremy Kemper
48052d70ec
to_xml fixes, features, and speedup. Closes #4989 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 00:01:08 +00:00
Jeremy Kemper
6aaa08d85b
PostgreSQL: don't ignore port when host is nil since it's often used to label the domain socket. Closes #5247 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 01:25:11 +00:00
Rick Olson
c9eb5a083f
delegate AssociationProxy#to_param to the association target so that associated models can be used in routes. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 22:01:40 +00:00
Jeremy Kemper
74b7bfa6d2
Mind the order of things.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 02:04:35 +00:00
Jeremy Kemper
97f4a5aa14
Quell warnings. Closes #5245 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 02:02:42 +00:00
Jeremy Kemper
b09d02c9e8
Records and arrays of records are bound as quoted ids.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-01 01:43:20 +00:00