Commit Graph

1229 Commits

Author SHA1 Message Date
David Heinemeier Hansson
5779deb88d Refactored select routing for SQL Server adapter (closes #5683) [tom@popdog.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-05 21:18:12 +00:00
David Heinemeier Hansson
c99df461f4 Fixed that default timezones for new / initialize should uphold utc setting (closes #5709) [daniluk@yahoo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-05 20:50:26 +00:00
Jeremy Kemper
604eb8ab95 Fix announcement of very long migration names. Closes #5722.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-05 01:39:57 +00:00
Jeremy Kemper
58ebf302b2 The exists? class method should treat a string argument as an id rather than as conditions. Closes #5698.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-03 22:06:33 +00:00
David Heinemeier Hansson
b5c2366569 Fixed to_xml with :include misbehaviors when invoked on array of model instances (closes #5690) [alexkwolfe@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-03 17:19:45 +00:00
David Heinemeier Hansson
8085cbfd08 Added support for conditions on Base.exists? (closes #5689) [josh@joshpeek.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-03 17:16:43 +00:00
Jeremy Kemper
29ae3e9098 Schema dumper quotes date :default values.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-02 20:20:38 +00:00
Jeremy Kemper
4f017bb1b0 more concise destroy test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-01 07:33:17 +00:00
Jeremy Kemper
9ee5d54e4d r4889@ks: jeremy | 2006-07-31 20:27:15 -0700
Create and update return the new pk and the number of affected rows, respectively. The job of returning true to appease the validations chain is up to create_or_update.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-01 03:35:04 +00:00
Rick Olson
ab0277f220 Calculate sum with SQL, not Enumerable on HasManyThrough Associations. [Dan Peterson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-31 21:06:19 +00:00
Jeremy Kemper
dd664c33b7 r4880@ks: jeremy | 2006-07-30 23:52:59 -0700
Only set method_name = md.pre_match if the pre_match is an attribute. Plays nicely with other ? suffixed attribute methods.
 r4881@ks:  jeremy | 2006-07-30 23:53:37 -0700
 Heavier testing for attribute method suffixes.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4635 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-31 06:54:06 +00:00
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