aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* Forced newer versions of RedCloth to use hard breaks [DHH]David Heinemeier Hansson2005-10-021-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Association validation does not belong in a before_save callback: move it ↵Jeremy Kemper2005-10-025-67/+109
| | | | | | 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
* Get rid of old symbolize_strings_in_hash.Jeremy Kemper2005-09-303-18/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2427 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket #2282 - fix parsing of timestamps with time zoneJeremy Kemper2005-09-301-1/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* No need to string.to_s right after checking that string.is_a?(String)Jeremy Kemper2005-09-301-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move transaction thread-safety test to transactions_test. Check that ↵Jeremy Kemper2005-09-302-47/+79
| | | | | | 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
* Use transactional fixtures by default for AR tests. Set ↵Jeremy Kemper2005-09-301-11/+6
| | | | | | 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
* Require topic model rather than assume another test has already.Jeremy Kemper2005-09-301-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2415 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Disable transactional fixtures for ar_schema_test and schema_test_postgresqlJeremy Kemper2005-09-302-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix broken testcase for transactionsNicholas Seckar2005-09-292-7/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clean up and extend test coverage for validates_numericality_ofJeremy Kemper2005-09-291-37/+60
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2402 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix transactions so that calling return while inside a transaction will not ↵Nicholas Seckar2005-09-283-5/+41
| | | | | | leave an open transaction on the connection. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make schema definition column lookups agnostic w/r/t/ whether a key or ↵Marcel Molina2005-09-281-2/+2
| | | | | | symbol is passed. Fixes failing test in [2396]. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add failing test that shows that AR::Migration.remove_column fails silently ↵Marcel Molina2005-09-281-3/+17
| | | | | | with SQLite when passed arguments as symbols. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket #2156 - Use foreign_key inflection uniformlyJeremy Kemper2005-09-282-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3657@asus: jeremy | 2005-09-28 00:32:33 -0700Jeremy Kemper2005-09-281-1/+3
| | | | | | | 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
* r3653@asus: jeremy | 2005-09-28 00:23:49 -0700Jeremy Kemper2005-09-285-14/+81
| | | | | | | 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
* Returning false in before_destroy should cancel action. Closes #1829.Scott Barron2005-09-283-2/+41
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to ↵Jeremy Kemper2005-09-274-17/+26
| | | | | | CURRENT_TIMESTAMP/CURRENT_DATE git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update change log for #2250.Jeremy Kemper2005-09-271-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2372 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add extensive documentation to the ActiveRecord::AbstractAdapter. #2250Marcel Molina2005-09-276-38/+210
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oops, swapped order of params to COALESCE! Upcoming patch has test cases.Jeremy Kemper2005-09-271-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3632@asus: jeremy | 2005-09-27 12:18:49 -0700Jeremy Kemper2005-09-271-1/+1
| | | | | | | reset_sequences cleanup also fixed #2183; credit ticket author git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2367 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix serialization problem with YAML in 1.8.3Scott Barron2005-09-272-17/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3613@asus: jeremy | 2005-09-26 22:25:04 -0700Jeremy Kemper2005-09-272-2/+4
| | | | | | | Handle sequence reset for empty tables and models with custom primary keys. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2357 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3605@asus: jeremy | 2005-09-26 19:10:50 -0700Jeremy Kemper2005-09-261-0/+2
| | | | | | | Update change log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3604@asus: jeremy | 2005-09-26 19:10:42 -0700Jeremy Kemper2005-09-261-20/+29
| | | | | | | Treat validates_size_of :within as a single validator rather than splitting it into to ends of the range, thus yield two error messages on nil (yuck) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2355 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3603@asus: jeremy | 2005-09-26 19:10:00 -0700Jeremy Kemper2005-09-261-5/+10
| | | | | | | 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
* Make update_attribute use the same writer method that update_attributes uses.Marcel Molina2005-09-263-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2353 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations honor table name prefixes and suffixes.Marcel Molina2005-09-264-7/+71
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3597@asus: jeremy | 2005-09-26 17:39:23 -0700Jeremy Kemper2005-09-261-5/+5
| | | | | | | Minor improvement to SQLite adapter blob escaping. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2351 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3592@asus: jeremy | 2005-09-26 17:01:47 -0700Jeremy Kemper2005-09-261-0/+2
| | | | | | | Update change log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3591@asus: jeremy | 2005-09-26 17:01:30 -0700Jeremy Kemper2005-09-261-43/+22
| | | | | | | 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
* r3590@asus: jeremy | 2005-09-26 17:00:53 -0700Jeremy Kemper2005-09-261-7/+43
| | | | | | | Correct and optimize PostgreSQL bytea escaping. This is a blend of four patches, each providing a bit to the solution. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3589@asus: jeremy | 2005-09-26 16:58:40 -0700Jeremy Kemper2005-09-262-0/+0
| | | | | | | 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
* r3569@asus: jeremy | 2005-09-26 05:33:09 -0700Jeremy Kemper2005-09-262-6/+8
| | | | | | | | | | | Ticket 1749 - reset_sequences workaround for non-integer sequences r3570@asus: jeremy | 2005-09-26 08:30:30 -0700 Fixtures.reset_sequences should only reset sequences corresponding to integer primary keys named id. #1749 r3571@asus: jeremy | 2005-09-26 08:31:11 -0700 Update change log. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2343 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Include the orders table in *.drop.sqlJeremy Kemper2005-09-266-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2342 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Get rid of warnings generated by calling obsolete .to_a method on a SymbolMarcel Molina2005-09-261-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2341 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove duplicate 'quote_column_name' definitionJamis Buck2005-09-251-5/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored the AbstractAdapter to be a lot less scary. Cleaned up the docs ↵David Heinemeier Hansson2005-09-2511-710/+792
| | | | | | and style for the OSS adapters git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Standardize the interpretation of boolean columns in the Mysql and Sqlite ↵Jamis Buck2005-09-256-9/+60
| | | | | | 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
* Fix migrations with PG 7.x.Scott Barron2005-09-251-0/+13
| | | | | | | Closes #1850 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2332 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Okay, you can have an extra spaceDavid Heinemeier Hansson2005-09-251-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assignment instead of callDavid Heinemeier Hansson2005-09-251-3/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use assignment instead of callDavid Heinemeier Hansson2005-09-253-18/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added new symbol-driven approach to activating observers with Base#observer ↵David Heinemeier Hansson2005-09-254-6/+48
| | | | | | [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrap :conditions in parentheses to prevent problems with OR's #1871Jamis Buck2005-09-247-11/+39
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added AbstractAdapter#select_value and AbstractAdapter#select_values as ↵David Heinemeier Hansson2005-09-244-10/+28
| | | | | | 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
* Just include activerecord/schema with AR so it doesnt need to be dumpedDavid Heinemeier Hansson2005-09-243-8/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the sqlite adapter preserve not-null constraints and index names when ↵Jamis Buck2005-09-241-3/+12
| | | | | | altering tables git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de