aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* Refactor compute_type to handle situations where the correct class is ↵Andrew White2010-04-127-9/+69
| | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com>
* make ActiveRecord::Base.subclasses a public methodEmmanuel Oga2010-04-121-0/+4
| | | | Signed-off-by: wycats <wycats@gmail.com>
* table_name_prefix and table_name_suffix are class_attributes instead of ↵Phil Smith2010-04-121-7/+51
| | | | | | cattr_accessors. [#4230] Signed-off-by: José Valim <jose.valim@gmail.com>
* mode postgresql adapters table_exists? method take the schema in to account. ↵Aaron Patterson2010-04-111-0/+15
| | | | | | [#4341 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* clearing up many warnings, removing unnecessary regular expresion ↵Aaron Patterson2010-04-101-1/+1
| | | | | | comparisons [#4365 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵mfoster2010-04-101-1/+11
| | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* clear the rest of the warnings, run with warnings turned on [#4332 ↵Aaron Patterson2010-04-101-25/+39
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* kill warnings on 1.8.7 [#4331 state:resolved]Aaron Patterson2010-04-101-4/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "When creating database with rake, create schemas in ↵Michael Koziarski2010-04-092-13/+0
| | | | | | | | | | | | | schema_search_path if it doesn't exist." This reverts commit 6c2a0675f11a9b5b8e88ed7dbccd65cb51be8029. Reverting because it breaks the ability to run tests using a non-superuser. Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb activerecord/lib/active_record/railties/databases.rake
* Dirty datetime attributes should be aware of time zone info [#3658 ↵Kristopher Murata2010-04-081-0/+95
| | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Reset named scope cache whenever the @target is resetPratik Naik2010-04-071-0/+10
|
* Memoize association.named_scope callsPratik Naik2010-04-051-0/+9
|
* Add tests to prevent regression of lazy evaluation of has_many ..., ↵Andrew White2010-04-041-0/+18
| | | | | | | | :dependent => :___ [#2627 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add Relation extensionsPratik Naik2010-04-022-0/+22
|
* Add tests for postgresql column type mapping updates [#4270 state:resolved]Ernie Miller2010-03-311-0/+17
| | | | Signed-off-by: Emilio Tagua <miloops@gmail.com>
* Dont try to load the record from the db if preloading didn't find anythingPratik Naik2010-03-311-0/+6
|
* Fix failing test in MySQL.Emilio Tagua2010-03-301-3/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Named scopes shouldn't test equality using to_a if it's not an Array, this ↵Emilio Tagua2010-03-301-3/+9
| | | | | | was causing records to be loaded before they were needed. Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix dom_id for ActiveRecord [#4296 state:resolved]José Valim2010-03-301-0/+6
|
* Fix honoring :primary_key option when joining or eager loading a belongs_to ↵Ernie Miller2010-03-291-0/+13
| | | | | | | | association [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Warn scoped order and limit are ignored. [#4123 state:resolved]Emilio Tagua2010-03-291-3/+13
|
* Add the ability to specify table_name_prefix on individual modulesAndrew White2010-03-282-0/+45
| | | | Signed-off-by: wycats <wycats@gmail.com>
* defining a named_scope which overwrites an existing method is now allowed we ↵Matthew Rudy Jacobs2010-03-281-2/+15
| | | | | | | | | just log a warning. This was motivated by the fact that :open is defined on all classes as such the named_scope "open" can never be used, without hacking ActiveRecord with an "undef_method" [#4083 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Add :dependent = to has_one and has_many [#3075 state:resolved]Rizwan Reza2010-03-284-2/+29
|
* When creating database with rake, create schemas in schema_search_path if it ↵Rizwan Reza2010-03-282-0/+13
| | | | doesn't exist.
* Revert "primary_key now supports :limit for MySQL". Break Sam Ruby app.José Valim2010-03-272-13/+2
| | | | | | To reproduce, start a new application, create a scaffold and run test suite. [#876 state:open] This reverts commit faeca694b3d4afebf6b623b493e86731e773c462.
* primary_key now supports :limit for MySQLRizwan Reza2010-03-272-2/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Revert "primary_key now supports :limit. [#876 state:resolved]" since it ↵José Valim2010-03-272-13/+2
| | | | | | broke AR test suite. This reverts commit 41e5c7ed44fedb95636ef9b7a792c46ea03309bd.
* primary_key now supports :limit. [#876 state:resolved]Rizwan Reza2010-03-272-2/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Revert "Changed behavior of touch and added touch! Originally implemented by ↵Pratik Naik2010-03-271-25/+0
| | | | | | Obie Fernandez, updated touch! to act as a thin wrapper to touch. [#2520 state:resolved]" This reverts commit 3a875e618487a06a56f6cf912cf5440f294921cc.
* Changed behavior of touch and added touch! Originally implemented by Obie ↵Nathaniel Bibler2010-03-271-0/+25
| | | | | Fernandez, updated touch! to act as a thin wrapper to touch. [#2520 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* In PostgreSQLAdapter, switch tables query to use current_schemas function ↵Kris Selden2010-03-261-0/+9
| | | | | | [#918 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
* Add add_limit_offset! to adapters.Emilio Tagua2010-03-251-0/+21
|
* expand migration paths before requiring them. [#4240 state:resolved]Aaron Patterson2010-03-231-0/+13
| | | | Signed-off-by: wycats <wycats@gmail.com>
* do not use unloadable constants in tests [#4260 state:resolved]Aaron Patterson2010-03-231-2/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Reset class attribute after changing itEvan Phoenix2010-03-221-0/+2
|
* Clear the query cache between tests that test the query cacheEvan Phoenix2010-03-221-0/+4
|
* Remove obsolete use case that was broken in AR::ObserversEvan Phoenix2010-03-221-40/+0
|
* Don't depend on order of elements in SetEvan Phoenix2010-03-221-5/+16
|
* Remove test ordering bug by using another classEvan Phoenix2010-03-221-4/+7
|
* squelching more warnings in the AR tests. [#4218 state:resolved]Aaron Patterson2010-03-183-13/+39
| | | | Signed-off-by: wycats <wycats@gmail.com>
* removing dead code from activerecord tests. [#4187 state:resolved]Aaron Patterson2010-03-154-46/+0
| | | | Signed-off-by: wycats <wycats@gmail.com>
* cleaning up a bunch of parse time warnings in AR [#4186 state:resolved]Aaron Patterson2010-03-159-26/+26
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Hack to keep column metadata queries out of test query countsJeremy Kemper2010-03-151-0/+5
|
* Hack to keep column metadata queries out of test query countsJeremy Kemper2010-03-151-3/+7
|
* restricts a test to < 1.9, and rewrites it using a proper expectationXavier Noria2010-03-132-11/+6
| | | | Signed-off-by: wycats <wycats@gmail.com>
* adds coverage for the issue addressed in fe43bbdXavier Noria2010-03-121-0/+14
| | | | | | [#4166 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix associations to call :destroy or :delete based on the right :dependent ↵Carlos Antonio da Silva2010-03-096-37/+36
| | | | | | option Signed-off-by: José Valim <jose.valim@gmail.com>
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-0/+1
| | | | | | | | | | | | add lazy_load_hooks.rb, which allows us to declare code that should be run at some later time. For instance, this allows us to defer requiring ActiveRecord::Base at boot time purely to apply configuration. Instead, we register a hook that should apply configuration once ActiveRecord::Base is loaded. With these changes, brings down total boot time of a new app to 300ms in production and 400ms in dev. TODO: rename base_hook
* Somehow this fixes the AR tests when ran with rake. I should probably figure ↵Carl Lerche2010-03-041-1/+1
| | | | out why.