aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/base_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for SQLite 2.Pratik Naik2009-08-171-10/+8
| | | | If you're still using it, please install the plugin from git://github.com/rails/sqlite2_adapter.git
* With multiparameter date attributes, the behaviour when empty fields are ↵Hugo Peixoto2009-08-091-1/+46
| | | | | | | | present is now coherent with the one described in the date_select documentation. [#1715 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add destroyed? to ActiveRecord, include tests for polymorphic urls for ↵José Valim2009-08-071-0/+17
| | | | destroyed objects and refactor mime responds tests and documentation.
* quoted_date converts time-like objects to ↵Geoff Buesing2009-08-031-0/+69
| | | | ActiveRecord::Base.default_timezone before serialization. This allows you to use Time.now in find conditions and have it correctly be serialized as the current time in UTC when default_timezone == :utc [#2946 state:resolved]
* Undefine id and let it automatically be generatedJoshua Peek2009-07-301-5/+0
|
* Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-1/+1
| | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Added AR:B#dup method for duplicationg object without frozen attributes ↵Yehuda Katz + Carl Lerche2009-07-011-0/+4
| | | | | [#2859 state:resolved] Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-011-3/+3
| | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
* Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-221-3/+3
| | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql.
* Generate proper :counter_sql from :finder_sql when there is a newline ↵Patrick Joyce2009-06-211-3/+3
| | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* disabled base_test.rb tests that were not Oracle compatible (TIME datatype ↵Raimonds Simanovskis2009-06-091-30/+41
| | | | | | is not supported on Oracle, UPDATE does not support ORDER BY) _before_type_cast on Oracle returns Time and not String added Oracle specific schema definition that was missing for test_default_values test Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
|
* Fix models load order to be able to run unit tests.Emilio Tagua2009-04-231-3/+3
| | | | | | [#2550 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add microsecond support for sqlite adapter [#1982 state:resolved]Alex Pooley2009-04-211-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Specify :group with the table name for it to work on sqlite3Pratik Naik2009-04-211-1/+1
|
* Allow find(:last) :order be a symbol [#2024 state:resolved]Rob Anderton2009-03-091-0/+5
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-9/+9
| | | | [#1617 state:resolved]
* DRY with_kcode in Active Record testsPratik Naik2009-03-071-14/+0
|
* Fix that scoped find with :group and :having [#2006 state:resolved]Mike Gunderloy2009-02-281-0/+7
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add array id support to Model.update_counters. [#1254 state:resolved] ↵Pratik Naik2009-01-281-0/+7
| | | | [Carlos Júnior]
* ActiveRecord::Base#new_record? now returns false for existing records (was ↵Yaroslav Markin2008-12-271-0/+5
| | | | | | nil) [#1219 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Ensure of Model#create support custom updated_at and updated_on attributes ↵Luis Hurtado2008-12-221-0/+10
| | | | | | [#1612 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove SQL Server cases from tests for latest adapter work to pass rails ↵Ken Collins2008-11-191-8/+5
| | | | | | expected behavior. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fixed that serialized strings should never be type-casted (i.e. turning ↵David Heinemeier Hansson2008-10-271-0/+6
| | | | "Yes" to a boolean)(Andreas Korth) [#857 state:committed]
* Merge branch 'patches' into multibyteMichael Koziarski2008-09-221-0/+26
|\
| * Add Model#delete instance method, similar to Model.delete class method. ↵Hongli Lai (Phusion2008-09-211-0/+26
| | | | | | | | | | | | [#1086 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Fix a test that assumes .mb_chars to always return an instance of the ↵Manfred Stienstra2008-09-211-7/+23
| | | | | | | | proxy_class.
* | Change all calls to String#chars to String#mb_chars. Remove a exception for ↵Manfred Stienstra2008-09-211-2/+2
|/ | | | Ruby <= 1.9.
* Multiparameter attributes skip time zone conversion for time-only columns ↵gbuesing2008-09-141-0/+18
| | | | [#1030 state:resolved]
* Support :limit on update_all so that has_many with :limit can be safely updatedTarmo Tänav2008-09-101-4/+15
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Revert "Revert "Raise UnknownAttributeError when unknown attributes are ↵Jeremy Kemper2008-09-081-0/+8
| | | | | | supplied via mass assignment"" This reverts commit 41efd73887c00ffd228b05d9346ec47a1f3759b9.
* Revert "Raise UnknownAttributeError when unknown attributes are supplied via ↵Jeremy Kemper2008-09-061-8/+0
| | | | | | mass assignment" This reverts commit 108db00aa90fe266564483ab301cf0669cae600f.
* Deprecate verification_timeout and verify before resetNick Sieger2008-09-041-1/+1
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Deprecate allow_concurrency and make it have no effectNick Sieger2008-08-291-1/+1
|
* fix another ordering failureJeremy Kemper2008-08-261-1/+1
|
* coerce blank strings to nil values for boolean and integer fieldsJosh Susser2008-08-221-1/+9
| | | | [#860 state:resolved]
* Fixed Time/Date object serializationTarmo Tänav2008-08-121-0/+6
| | | | | Time/Date objects used to be converted to_s instead of to_uaml which made them unserializable.
* Added missing fixtures for tests which fail to run independently if run ↵Tarmo Tänav2008-08-041-1/+1
| | | | | | after schema reset Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix file permissionsTarmo Tänav2008-07-311-0/+0
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Raise UnknownAttributeError when unknown attributes are supplied via mass ↵Pratik Naik2008-07-311-0/+8
| | | | assignment
* update_counters should update nil values.miloops2008-07-151-2/+19
| | | | | | This allows counter columns with default null instead of requiring default 0. [#493 state:resolved]
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ↵Joshua Peek2008-06-031-14/+14
| | | | ActiveSupport [#238 state:resolved]
* Added block-setting of attributes for Base.create like Base.new already has ↵David Heinemeier Hansson2008-04-301-0/+21
| | | | (Adam Meehan) [#39 state:resolved]
* Let Base.all use conditions etc like first/lastDavid Heinemeier Hansson2008-04-281-0/+4
|
* Use schema.rb for all databasesFrederick Cheung2008-04-221-1/+1
| | | | | | Move adapter specific schema into their own files Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Partial updates include only unsaved attributes. Off by default; set ↵Jeremy Kemper2008-03-311-0/+1
| | | | | | YourClass.partial_updates = true to enable. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now ↵Geoff Buesing2008-03-301-19/+17
| | | | | | bundled git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix some mistaken dependencies among AR unit tests. Closes #11425 ↵Jeremy Kemper2008-03-281-2/+2
| | | | | | [thechrisoshow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure ActiveRecord tests can run individually. Closes #11425 ↵Pratik Naik2008-03-281-1/+4
| | | | | | [thechrisoshow, h-lame] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added ActiveRecord#Base.all/first/last as aliases for ↵David Heinemeier Hansson2008-03-241-0/+4
| | | | | | find(:all/:first/:last) (closes #11413) [nkallen, thechrisoshow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9085 5ecf4fe2-1ee6-0310-87b1-e25e094e27de