Commit Graph

1218 Commits

Author SHA1 Message Date
Jeremy Kemper
2b3cc2478f r4854@ks: jeremy | 2006-07-30 00:59:18 -0700
Attribute methods
 r4877@ks:  jeremy | 2006-07-30 20:23:53 -0700
 Factor the attribute#{suffix} methods out of method_missing for easier extension.
 r4878@ks:  jeremy | 2006-07-30 20:42:23 -0700
 More specific method naming, declare many attribute method suffixes, set up default suffixes at module include rather than lazily.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-31 03:43:03 +00:00
Jamis Buck
99e9faeda8 Patch sql injection vulnerability when using integer or float columns.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-27 18:29:49 +00:00
Jeremy Kemper
89011da0de BigDecimal: schema dumper formatting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-24 17:14:48 +00:00
Rick Olson
971e03f24e Allow #count through a has_many association to accept :include. [Dan Peterson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-24 04:55:16 +00:00
Rick Olson
291adbd361 fix association exception messages, fix them so the error messages actually display
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-20 00:34:09 +00:00
Jeremy Kemper
35f7cc23ba create_table rdoc: suggest :id => false for habtm join tables
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 21:08:40 +00:00
Jeremy Kemper
ac68115205 PostgreSQL: return array fields as strings. Closes #4664.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:54:21 +00:00
Jeremy Kemper
f0c22d4ad5 occured -> occurred. Closes #5559.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:41:59 +00:00
Jeremy Kemper
a72ace1596 Ignore fixtures in test cases if there are no database configurations. References #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:31:44 +00:00
Jeremy Kemper
41f3b7ab56 Test connections use AR::Base.configurations. References #5497.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 19:27:04 +00:00
Jeremy Kemper
5ad4f1ad94 SQLServer: added tests to ensure all database statements are closed, refactored identity_insert management code to use blocks, removed update/delete rowcount code out of execute and into update/delete, changed insert to go through execute method, removed unused quoting methods, disabled pessimistic locking tests as feature is currently unsupported, fixed RakeFile to load sqlserver specific tests whether running in ado or odbc mode, fixed support for recently added decimal types, added support for limits on integer types. Closes #5670.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4601 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 18:24:35 +00:00
Jeremy Kemper
0293c34459 Oracle: BigDecimal support. Closes #5667.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4600 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-10 18:10:50 +00:00
Jeremy Kemper
2a12b56841 r4704@asus: jeremy | 2006-06-27 12:00:19 -0700
decimal
 r4705@asus:  jeremy | 2006-06-27 12:20:47 -0700
 current_adapter? checks whether any of its arguments is the name of the current adapter class
 r4834@asus:  jeremy | 2006-07-08 13:08:24 -0700
 Room to float.
 r4835@asus:  jeremy | 2006-07-08 13:09:18 -0700
 Give lock test a few chances.
 r4836@asus:  jeremy | 2006-07-08 13:12:05 -0700
 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 20:35:56 +00:00
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
de5b7370dd PostgreSQL: create/drop as postgres user. Closes #4790.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 01:28:53 +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
c4782f7393 More succinct current_adapter? Enable locking duel for Oracle.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-07 10:48:43 +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
40d8d77c64 Rename test file so it runs for MySQL only.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-06 17:30:54 +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
David Heinemeier Hansson
bffb29fb7d Fixed test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4556 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 18:09:49 +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
73c80169c8 rake should run active_schema_mysql_test.rb (closes #5390)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 02:30:37 +00:00
David Heinemeier Hansson
750ca7998b Added :group to available options for finds done on associations (closes #5516) [mike@michaeldewey.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-05 01:48:09 +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
a092749554 rake build_mysql_database grants permissions to rails@localhost. Closes #5501.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-28 23:36:22 +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
ef77ec7710 r4669@asus: jeremy | 2006-06-20 12:53:36 -0700
Getting picayune with locking_test.  Closes #4871.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4472 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-20 19:54:35 +00:00