aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use query methods rather than readers in boolean tests for [3092]. ↵Jeremy Kemper2005-11-191-4/+4
| | | | | | References #2945. Closes #2949. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3094 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct boolean handling in generated reader methods. References #2945.Jeremy Kemper2005-11-191-0/+34
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't generate read methods for columns whose names are not valid ruby ↵Jeremy Kemper2005-11-191-0/+7
| | | | | | method names. References #2946. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3095@asus: jeremy | 2005-11-15 22:40:51 -0800Jeremy Kemper2005-11-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Ticket #1874 - Firebird adapter r3107@asus: jeremy | 2005-11-16 00:06:14 -0800 quote column aliases r3108@asus: jeremy | 2005-11-16 00:08:12 -0800 quote columns in construct_conditions_from_arguments. update sequence_name docs. introduce prefetched primary keys. r3109@asus: jeremy | 2005-11-16 00:09:08 -0800 double-quote rather than single-quote sqlite columns r3110@asus: jeremy | 2005-11-16 00:09:56 -0800 quote column names and use attribute_condition in validates_uniqueness_of r3111@asus: jeremy | 2005-11-16 00:12:24 -0800 Use QUOTED_TYPE constant in tests r3112@asus: jeremy | 2005-11-16 00:13:28 -0800 restrict test_inserts_with_pre_and_suffix to those adapters which support migrations r3113@asus: jeremy | 2005-11-16 00:14:09 -0800 Use QUOTED_TYPE constant in tests r3114@asus: jeremy | 2005-11-16 00:14:30 -0800 Use QUOTED_TYPE constant in tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle: test case for column default parsing. References #2788.Jeremy Kemper2005-11-141-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4325@asus: jeremy | 2005-11-12 03:57:46 -0800Jeremy Kemper2005-11-121-3/+3
| | | | | | | PostgreSQL: correctly discover custom primary key sequences. PostgreSQL: smarter sequence name defaults, stricter last_insert_id, warn on pk without sequence. Base.reset_sequence_name analogous to reset_table_name (mostly useful for testing). Base.define_attr_method allows nil values. References #2594. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r2915@asus: jeremy | 2005-11-06 05:02:53 -0800Jeremy Kemper2005-11-061-5/+5
| | | | | | | Rename Base.constrain to Base.with_scope so it doesn't conflict with existing concept of database constraints. Make scoping more robust: uniform method => parameters, validated method names and supported finder parameters, raise exception on nested scopes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct reader method generation for primary key attribute: handle case when ↵Jeremy Kemper2005-11-021-1/+1
| | | | | | primary_key is defined but its column is nil, such as when the model class is backed by a view. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support for Oracle (closes #2647) [Michael Schoen]David Heinemeier Hansson2005-10-291-5/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2817 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migration support to SQL Server adapter (please someone do the same ↵David Heinemeier Hansson2005-10-281-0/+6
| | | | | | for Oracle and DB2) (closes #2625) [Tom Ward] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor DB exceptions and deal more with DB2 (closes #2624)David Heinemeier Hansson2005-10-271-42/+29
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :offset and :limit to the kinds of options that Base.constrain can use ↵David Heinemeier Hansson2005-10-261-0/+24
| | | | | | (closes #2466) [duane.johnson@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed handling of nil number columns on Oracle and cleaned up tests for ↵David Heinemeier Hansson2005-10-261-4/+8
| | | | | | Oracle in general #2555 [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Clarify semantics of ActiveRecord::Base#respond_to? Closes #2560.Jeremy Kemper2005-10-221-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make all of tests runnable on their own.Marcel Molina2005-10-191-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2691 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a few sqlserver test case errors. Closes #2486Tobias Lütke2005-10-171-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3616@asus: jeremy | 2005-09-26 23:09:28 -0700Jeremy Kemper2005-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Ticket 2292 - Sequences, schemas, and fixtures r3917@asus: jeremy | 2005-10-15 10:43:24 -0700 fix pk assert r3918@asus: jeremy | 2005-10-15 10:46:52 -0700 rework query cache connection= override r3919@asus: jeremy | 2005-10-15 10:47:45 -0700 correct fixtures usage r3920@asus: jeremy | 2005-10-15 10:53:23 -0700 correct attr assignment r3921@asus: jeremy | 2005-10-15 12:59:10 -0700 sequences r3922@asus: jeremy | 2005-10-15 16:36:09 -0700 reset fixtures work with sequences r3951@asus: jeremy | 2005-10-15 23:23:12 -0700 cut down excess features r3952@asus: jeremy | 2005-10-15 23:40:30 -0700 don't test for PostgreSQL specifically git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Comment out the memory leak test because it b0rks the testing environment. ↵Jamis Buck2005-10-161-18/+21
| | | | | | Update some contact info. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* squash the memleak in dev mode finally (fingers crossed, here)Jamis Buck2005-10-151-0/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change quote delimiters for sql interpolation to obviate SyntaxErrors. ↵Marcel Molina2005-10-141-0/+6
| | | | | | Closes 2215. [leroen@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Protect id attribute from mass assigment even when the primary key is set to ↵Marcel Molina2005-10-121-0/+18
| | | | | | something else. Closes #2438. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2541 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up the setting of table_name. Closes #2428.Marcel Molina2005-10-101-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add geometric type for postgresql adapter. Closes #2233.Marcel Molina2005-10-091-0/+62
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2498 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add option (true by default) to generate reader methods for each attribute ↵Marcel Molina2005-10-071-0/+20
| | | | | | of a record to avoid the overhead of calling method missing. In partial fullfilment of #1236. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2483 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixup tests for [2474].Jeremy Kemper2005-10-061-10/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Quote booleans according the rules defined by the adapterMichael Koziarski2005-10-061-1/+6
| | | | | | | | | | * SQLite schema has been updated * Postgresql schema needs to be fixed too Simplify AR::Base#toggle to store the boolean, not the quoted value * expand the tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to ↵Jeremy Kemper2005-09-271-16/+21
| | | | | | CURRENT_TIMESTAMP/CURRENT_DATE git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix serialization problem with YAML in 1.8.3Scott Barron2005-09-271-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2360 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed comparison of Active Record objects so two new objects are not equal ↵David Heinemeier Hansson2005-09-091-0/+4
| | | | | | #2099 [deberg] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Modify read_attribute to allow a symbol argument #2024 [Ken Kunz]Jamis Buck2005-09-021-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make destroy return self #1913 [sebastian.kanthak@muehlheim.de]Jamis Buck2005-08-141-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made Oracle a first-class connection adapter by adhering closer to idiomatic ↵David Heinemeier Hansson2005-07-241-1/+1
| | | | | | Oracle style #1798 [The Gang of Oracles] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed incompatibility in DB2 adapter with the new limit/offset approach ↵David Heinemeier Hansson2005-07-171-1/+1
| | | | | | #1718 [Maik Schmidt] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix regression from [1631] that caused an attribute to be set to nil if it ↵Jamis Buck2005-07-051-0/+6
| | | | | | was assigned false git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1709 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed Base#write_attribute to work with both symbols and strings #1190 [Paul ↵David Heinemeier Hansson2005-07-031-0/+9
| | | | | | Legato] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that has_and_belongs_to_many didn't respect single table inheritance ↵David Heinemeier Hansson2005-07-031-1/+1
| | | | | | types #1081 [Florian Weber] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added support for ODBC connections to MS SQL Server so you can connect from ↵David Heinemeier Hansson2005-07-011-0/+8
| | | | | | a non-Windows machine #1569 [Mark Imbriaco/DeLynn Berry] Added support for limit/offset with the MS SQL Server driver so that pagination will now work #1569 [DeLynn Berry] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that multiparameter posts ignored attr_protected #1532 ↵David Heinemeier Hansson2005-06-281-0/+13
| | | | | | [alec+rails@veryclever.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated all references to the old find_first and find_all to use the new ↵David Heinemeier Hansson2005-06-261-5/+5
| | | | | | style #1511 [Marcel Molina] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1520 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that clear_association_cache doesn't delete new associations on new ↵David Heinemeier Hansson2005-06-251-0/+21
| | | | | | records (so you can safely place new records in the session with Action Pack without having new associations wiped) #1494 [cluon] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Be sure to use the @finder_sql in the has_many association's #find method, ↵Jamis Buck2005-06-131-1/+2
| | | | | | even if explicit conditions have not been given. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Do not use instantiated fixtures (in general) in tests. Also, support the ↵Jamis Buck2005-06-101-21/+21
| | | | | | use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes". git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that clone would break when an aggregate had the same name as one of ↵David Heinemeier Hansson2005-05-191-3/+31
| | | | | | its attributes #1307 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the callbacks such that observers are notified before the in-object ↵David Heinemeier Hansson2005-05-021-1/+8
| | | | | | callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added compatibility with camelCase column names for dynamic finders #533 ↵David Heinemeier Hansson2005-04-301-1/+2
| | | | | | [Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed extraneous comma in count() function that made it not work with joins ↵David Heinemeier Hansson2005-04-301-0/+12
| | | | | | #1156 [jarkko/Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* A few more tests #1199David Heinemeier Hansson2005-04-301-1/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* decrease reliance on instantiated fixtures #980 [Jeremy Kemper]David Heinemeier Hansson2005-04-021-21/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1062 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added MultiparameterAssignmentErrors and AttributeAssignmentError exceptions ↵David Heinemeier Hansson2005-03-061-0/+10
| | | | | | #777 [demetrius] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@853 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the auto-timestamping feature to use ↵David Heinemeier Hansson2005-02-241-2/+2
| | | | | | ActiveRecord::Base.default_timezone instead of entertaining the parallel ActiveRecord::Base.timestamps_gmt method. The latter is now deprecated and will throw a warning on use (but still work) #710 [Jamis Buck] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de