Jeremy Kemper
|
e19bd169fa
|
Association validation does not belong in a before_save callback: move it into a validation method. Restores the expected model.valid? == model.save. Add tests for cancelling save by returning false from a before_save callback. Remove assumption that before_destroy's return value indicates whether the record was destroyed.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-10-02 02:00:50 +00:00 |
|
Jeremy Kemper
|
e828657973
|
Move transaction thread-safety test to transactions_test. Check that simultaneous transactions don't step on each others' toes. Check that simultaneous transactions don't give dirty reads (read-committed txn isolation or greater.)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2417 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-30 03:39:15 +00:00 |
|
Jeremy Kemper
|
4ce9b4c557
|
Use transactional fixtures by default for AR tests. Set ENV['AR_NO_TX_FIXTURES'] to yes to disable. Tidy up abstract_unit.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-30 01:00:04 +00:00 |
|
Jeremy Kemper
|
093a87d1a3
|
Require topic model rather than assume another test has already.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-30 00:58:26 +00:00 |
|
Jeremy Kemper
|
110360f858
|
Disable transactional fixtures for ar_schema_test and schema_test_postgresql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-30 00:57:27 +00:00 |
|
Nicholas Seckar
|
6f38041133
|
Fix broken testcase for transactions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-29 11:16:51 +00:00 |
|
Jeremy Kemper
|
67d1e0cd3d
|
Clean up and extend test coverage for validates_numericality_of
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-29 02:35:41 +00:00 |
|
Nicholas Seckar
|
fc83920383
|
Fix transactions so that calling return while inside a transaction will not leave an open transaction on the connection.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-28 18:53:22 +00:00 |
|
Marcel Molina
|
f43d97a860
|
Add failing test that shows that AR::Migration.remove_column fails silently with SQLite when passed arguments as symbols.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-28 17:50:28 +00:00 |
|
Jeremy Kemper
|
dd21e9ae39
|
r3657@asus: jeremy | 2005-09-28 00:32:33 -0700
Also test that client.firm_id.nil? after firm.clients.clear when clients is not :dependent
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2385 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-28 04:00:59 +00:00 |
|
Jeremy Kemper
|
efaf2af07c
|
r3653@asus: jeremy | 2005-09-28 00:23:49 -0700
Ticket 2221 - model.association.clear should destroy associated objects if :dependent => true instead of nullifying their foreign keys
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-28 03:52:57 +00:00 |
|
Scott Barron
|
83b390bcfc
|
Returning false in before_destroy should cancel action. Closes #1829.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-28 00:09:50 +00:00 |
|
Jeremy Kemper
|
0bd11857ef
|
Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to CURRENT_TIMESTAMP/CURRENT_DATE
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-27 23:37:57 +00:00 |
|
Scott Barron
|
76a7a52557
|
Fix serialization problem with YAML in 1.8.3
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-27 09:25:17 +00:00 |
|
Jeremy Kemper
|
54adccda08
|
r3603@asus: jeremy | 2005-09-26 19:10:00 -0700
Add unit tests for nil assigned to validates_size_of :attr, :within
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-26 22:40:51 +00:00 |
|
Marcel Molina
|
1465f9cee2
|
Make migrations honor table name prefixes and suffixes.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-26 21:30:12 +00:00 |
|
Jeremy Kemper
|
27ecb482c6
|
r3591@asus: jeremy | 2005-09-26 17:01:30 -0700
Simplify binary unit test. Use flowers.jpg instead of associations.png
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2348 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-26 20:29:06 +00:00 |
|
Jeremy Kemper
|
79a535ecd7
|
r3589@asus: jeremy | 2005-09-26 16:58:40 -0700
Remove associations.png in favor of flower.jpg which reveals a bug in binary escaping.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-26 20:28:55 +00:00 |
|
Jeremy Kemper
|
b2c46ed5fd
|
Include the orders table in *.drop.sql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-26 08:23:04 +00:00 |
|
Jamis Buck
|
ea65465422
|
Standardize the interpretation of boolean columns in the Mysql and Sqlite adapters. (Use MysqlAdapter.emulate_booleans = false to disable this behavior)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-25 15:49:35 +00:00 |
|
David Heinemeier Hansson
|
7f86e026f6
|
Use assignment instead of call
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-25 08:48:30 +00:00 |
|
David Heinemeier Hansson
|
948be2c998
|
Added new symbol-driven approach to activating observers with Base#observer [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-25 08:26:29 +00:00 |
|
Jamis Buck
|
2a35baa0bb
|
Wrap :conditions in parentheses to prevent problems with OR's #1871
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-24 23:58:13 +00:00 |
|
David Heinemeier Hansson
|
caaf40d535
|
Added AbstractAdapter#select_value and AbstractAdapter#select_values as convenience methods for selecting single values, instead of hashes, of the first column in a SELECT #2283
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2323 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-24 19:50:57 +00:00 |
|
Jamis Buck
|
6d4a4a0d2e
|
Make sqlite adapter pass all tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2315 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-23 15:00:56 +00:00 |
|
Jamis Buck
|
7dc45818dc
|
Add ActiveRecord::SchemaDumper for dumping a DB schema to a pure-ruby file, making it easier to consolidate large migration lists and port database schemas between databases.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-23 13:29:33 +00:00 |
|
David Heinemeier Hansson
|
66ecf31ffe
|
Fixed that the create_x method from belongs_to wouldn't save the association properly #2042 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-20 18:36:14 +00:00 |
|
Jamis Buck
|
5213a1f733
|
Fixed saving a record with two unsaved belongs_to associations pointing to the same object #2023 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2278 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-20 16:12:13 +00:00 |
|
David Heinemeier Hansson
|
6f95c49a15
|
Fixed that Observers didn't observe sub-classes #627 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-19 16:34:34 +00:00 |
|
Nicholas Seckar
|
251a5d4508
|
Fix eager loading error messages, allow :include to specify tables using strings or symbols. Closes #2222
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-18 20:41:44 +00:00 |
|
David Heinemeier Hansson
|
4307d7ecbe
|
Fixed various problems with has_and_belongs_to_many when using customer finder_sql #2094 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-13 10:15:54 +00:00 |
|
David Heinemeier Hansson
|
b646e0ddf7
|
Rolled back broken #1814
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2203 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-11 10:05:46 +00:00 |
|
David Heinemeier Hansson
|
57070277b4
|
Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-11 09:41:24 +00:00 |
|
David Heinemeier Hansson
|
1472bf273d
|
Fix tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-11 06:25:17 +00:00 |
|
David Heinemeier Hansson
|
4b53e26ef6
|
Fix fixture problem for pgsql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-11 04:18:07 +00:00 |
|
David Heinemeier Hansson
|
0faca07056
|
Fixed comparison of Active Record objects so two new objects are not equal #2099 [deberg]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-09 08:54:02 +00:00 |
|
David Heinemeier Hansson
|
3004217855
|
Fixed that the SQL Server adapter would sometimes return DBI::Timestamp objects instead of Time #2127 [Tom Ward]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-09 08:37:05 +00:00 |
|
David Heinemeier Hansson
|
e5cc729b18
|
Make the test_find_all_by_one_attribute and test_find_all_by_one_attribute_with_options tests not fail in SQL Server #2128 [Tom Ward]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-09 08:34:51 +00:00 |
|
David Heinemeier Hansson
|
0439769324
|
Refactored away all the legacy validate_options calls and replaced them with Hash#assert_valid_keys
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-09 08:32:47 +00:00 |
|
David Heinemeier Hansson
|
b063067321
|
Added the instance methods #root and #ancestors on acts_as_tree and fixed siblings to not include the current node #2142, #2140 [coffee2code]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-09 08:01:44 +00:00 |
|
Jamis Buck
|
e3d34286e3
|
Fixtures ignore table name prefix and suffix #1987 [Jakob S]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-02 10:51:23 +00:00 |
|
Jamis Buck
|
69d662051e
|
Modify read_attribute to allow a symbol argument #2024 [Ken Kunz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-09-02 08:31:11 +00:00 |
|
Jamis Buck
|
7d65f7cd3d
|
Revert [2040], caused assignment of belongs_to associations to fail in some cases
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2048 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-08-24 16:45:46 +00:00 |
|
Jamis Buck
|
943fde0a55
|
Add a failing test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2047 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-08-24 16:25:56 +00:00 |
|
Jamis Buck
|
dfe1aeb776
|
Saving a record with two unsaved belongs_to associations pointing to the same object fails #2023 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-08-23 11:05:04 +00:00 |
|
Jamis Buck
|
b1a4f91a58
|
Make destroy return self #1913 [sebastian.kanthak@muehlheim.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-08-14 08:58:53 +00:00 |
|
Jamis Buck
|
85c603fc9e
|
Make acts_as_list work for insert_at(1) #1966 [hensleyl@papermountain.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-08-14 08:35:08 +00:00 |
|
Jamis Buck
|
da874a4af8
|
Allow add_column and create_table to specify NOT NULL #1712 [emptysands@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-07-30 10:16:21 +00:00 |
|
Jamis Buck
|
369d054338
|
Fix create_table so that id column is implicitly added [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-07-27 17:06:22 +00:00 |
|
David Heinemeier Hansson
|
14ea312808
|
Made Oracle a first-class connection adapter by adhering closer to idiomatic Oracle style #1798 [The Gang of Oracles]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
|
2005-07-24 14:01:35 +00:00 |
|