aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Find with :include respects scoped :order. Closes #5850.Jeremy Kemper2006-11-071-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5445 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQLite: count(distinct) queries supported in >= 3.2.6, fix calculations ↵Jeremy Kemper2006-11-051-8/+10
| | | | | | workaround, remove count(distinct) query rewrite, cleanup test connection scripts. Closes #6544. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5426 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dynamically generate reader methods for serialized attributes. Closes #6362.Jeremy Kemper2006-11-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5416 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added update_attributes! which uses save! to raise an exception if a ↵David Heinemeier Hansson2006-10-091-1/+38
| | | | | | validation error prevents saving (closes #6192) [jonathan] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5256 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use class name as XML_TYPE_NAMES key.Jeremy Kemper2006-09-291-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: count class method should be called with an options hash rather ↵Jeremy Kemper2006-09-261-1/+1
| | | | | | than two args for conditions and joins. Closes #6287. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation tests. Remove warnings for dynamic finders and for the foo_count ↵Jeremy Kemper2006-09-151-29/+26
| | | | | | ethod if it's also an attribute. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5116 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Backed out of new_record? to new? transformation as it would screw up ↵David Heinemeier Hansson2006-09-051-4/+10
| | | | | | existing models that did boolean calls on "new" attributes [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5018 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated ActiveRecord::Base.new_record? in favor of ↵David Heinemeier Hansson2006-09-051-10/+4
| | | | | | ActiveRecord::Base.new? (old version still works until Rails 2.0) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml: the :methods option works on arrays of records. Closes #5845.Jeremy Kemper2006-09-021-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nested subclasses are not prefixed with the parent class' table_name since ↵Jeremy Kemper2006-08-251-5/+21
| | | | | | they should always use the base class' table_name. Closes #5911. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml: correct naming of included associations. Closes #5831.Jeremy Kemper2006-08-201-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Nested classes are given table names prefixed by the singular form of the ↵Jeremy Kemper2006-08-161-4/+8
| | | | | | parent's table name. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that default timezones for new / initialize should uphold utc setting ↵David Heinemeier Hansson2006-08-051-0/+16
| | | | | | (closes #5709) [daniluk@yahoo.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed to_xml with :include misbehaviors when invoked on array of model ↵David Heinemeier Hansson2006-08-031-0/+13
| | | | | | instances (closes #5690) [alexkwolfe@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* more concise destroy testJeremy Kemper2006-08-011-13/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Patch sql injection vulnerability when using integer or float columns.Jamis Buck2006-07-271-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4704@asus: jeremy | 2006-06-27 12:00:19 -0700Jeremy Kemper2006-07-081-1/+33
| | | | | | | | | | | | | | | 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
* PostgreSQL: correctly quote microseconds in timestamps. Closes #5641.Jeremy Kemper2006-07-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More succinct current_adapter? Enable locking duel for Oracle.Jeremy Kemper2006-07-071-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a few Oracle issues: Allows Oracle's odd date handling to still work ↵David Heinemeier Hansson2006-07-051-1/+1
| | | | | | 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
* PostgreSQL: support microsecond time resolution. Closes #5492.Jeremy Kemper2006-06-251-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4494 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change AR::Base#to_param to return a String instead of a Fixnum. Closes #5320.Nicholas Seckar2006-06-191-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored ActiveRecord::Base.to_xml to become a delegate for XmlSerializer, ↵David Heinemeier Hansson2006-06-041-11/+11
| | | | | | which restores sanity to the mega method. This refactoring also reinstates the opinions that type="string" is redundant and ugly and nil-differentiation is not a concern of serialization [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4431 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed usage of :limit and with_scope when the association in scope is a 1:m ↵David Heinemeier Hansson2006-06-031-0/+8
| | | | | | (closes #5208) [alex@purefiction.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4422 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* to_xml fixes, features, and speedup. Closes #4989.Jeremy Kemper2006-06-031-23/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* fixtures :accounts for base_test. Closes #5268.Jeremy Kemper2006-06-021-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4412 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Base.find :all, :conditions => [ "id IN (?)", collection ] would ↵David Heinemeier Hansson2006-06-011-2/+2
| | | | | | fail if collection was empty [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH] ↵David Heinemeier Hansson2006-05-311-0/+8
| | | | | | Split Grouping into its own file git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow AR::Base#to_xml to include methods too. Closes #4921. ↵Marcel Molina2006-04-291-0/+6
| | | | | | [johan@textdrive.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for FrontBase (http://www.frontbase.com/) with a new adapter ↵Marcel Molina2006-04-271-6/+6
| | | | | | thanks to the hard work of one Mike Laster. Closes #4093. [mlaster@metavillage.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add support for :order option to with_scope. Closes #3887. ↵Marcel Molina2006-04-261-0/+23
| | | | | | [eric.daspet@survol.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4274 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that that multiparameter assignment doesn't work with aggregations ↵David Heinemeier Hansson2006-04-061-0/+9
| | | | | | (closes #4620) [Lars Pind] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix type_name_with_module to handle type names that begin with '::'. Closes ↵Nicholas Seckar2006-04-061-0/+5
| | | | | | #4614. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed DB2 adapter so nullable columns will be determines correctly now and ↵David Heinemeier Hansson2006-03-221-2/+2
| | | | | | quotes from column default values will be removed (closes #4350) [contact@maik-schmidt.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix bug introduced by changeset 3679 which caused custom attribute? methods ↵David Heinemeier Hansson2006-03-201-2/+3
| | | | | | to be overridden. Also ensure that ? methods are defined even if read method is customised. (closes #3677) [jonathan@bluewire.net.nz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4002 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* add support for COUNT(DISTINCT id) queries in sqlite2 (closes #4300) [Rick ↵Rick Olson2006-03-191-3/+1
| | | | | | Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3979 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* skip count_by_sql test using COUNT(DISTINCT) for sqlite2 onlyRick Olson2006-03-191-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix boolean testDavid Heinemeier Hansson2006-03-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3977 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* SQL Server adapter gets some love (closes #4298) [rtomayko@gmail.com]David Heinemeier Hansson2006-03-181-2/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove broken attempts at handling columns with a a default of 'now()' in ↵Michael Koziarski2006-03-181-11/+0
| | | | | | the postgresql adapter. Closes #2257 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migrations support to the Sybase adapter (closes #4293) [John R. Sheets]David Heinemeier Hansson2006-03-181-2/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Oracle adapter gets some love #4230 [schoenm@earthlink.net]David Heinemeier Hansson2006-03-161-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.abstract_class? that marks which classes are not part of the ↵Rick Olson2006-03-161-2/+7
| | | | | | Active Record hierarchy. closes #3704 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make save! return true on success[johan@johansorensen.com]. Closes #4173Michael Koziarski2006-03-151-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Unit test fixes for postgresql.Michael Koziarski2006-03-151-2/+4
| | | | | | | | Allow to_xml tests to pass in time zones other than CST. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added options to control the :only/:except for included associations on ↵David Heinemeier Hansson2006-03-101-0/+11
| | | | | | Base#to_xml [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added association inclusion in to_xml [DHH]David Heinemeier Hansson2006-03-101-5/+43
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed to_xml across the board to use nice indention, better skip_attributes ↵David Heinemeier Hansson2006-03-091-0/+28
| | | | | | workings, no type on strings, and cleaned tests [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* added assert_queries for the AR test suiteRick Olson2006-03-051-0/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de