aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
Commit message (Collapse)AuthorAgeFilesLines
* Improve test coverage when using the group option in find, has_many or ↵miloops2008-09-114-2/+25
| | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵Manfred Stienstra2008-09-112-2/+35
| | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed]
* Fixes validates_uniquness_of problem with case insensitive string containing ↵wmoxam2008-09-111-0/+7
| | | | | | newline characters Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Add missing assert_deprecated calls to prevent spam during test runsMichael Koziarski2008-09-111-2/+6
|
* add activerecord tests to make sure the deprecated %s and %d interpolation ↵Sven Fuchs2008-09-101-1/+15
| | | | | | | | syntax still works [#1016 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* add activerecord tests for deprecation of %s and %d in error messages (and ↵Sven Fuchs2008-09-101-0/+12
| | | | | | translations in general) Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* change activerecord validation tests to not use the deprecated interpolation ↵Sven Fuchs2008-09-101-29/+29
| | | | | | syntax any more Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* fixed association preloading to use = instead of IN when there's only one recordrsl2008-09-101-1/+1
| | | | | | [#1013 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Add :accessible option to Associations for allowing mass assignments ↵Pratik Naik2008-09-101-108/+0
| | | | | | | | | | | | using hash. [#474 state:resolved]" This reverts commit e0750d6a5c7f621e4ca12205137c0b135cab444a. Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_collection.rb
* Added :constructor and :converter options to composed_of and deprecated the ↵Rob Anderton2008-09-101-0/+35
| | | | | | conversion block Signed-off-by: Michael Koziarski <michael@koziarski.com>
* 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>
* Fixed test_find_last_by_one_attribute_caches_dynamic_finder for postgresql 8.3Tarmo Tänav2008-09-101-1/+1
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Added find_last_by dynamic finder [status:committed #762]miloops2008-09-091-4/+36
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.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.
* Rescue spurious failures in case dummy postgresql user or schema already existsJeremy Kemper2008-09-041-2/+2
|
* Default connection allow_concurrency to false (for PostgreSQL)Nick Sieger2008-09-042-0/+4
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Deprecate verification_timeout and verify before resetNick Sieger2008-09-042-2/+2
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix transaction exception testJeremy Kemper2008-09-041-0/+1
|
* Database connections are now pooled, one pool per #establish_connection call.Jeremy Kemper2008-09-025-16/+116
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pools start out empty and grow as necessary to a maximum size (default is 5, configure size with key 'pool' in your database configuration). If no connections are available, a thread will wait up to a 'wait_timeout' time (default is 5 seconds). Connections are verified and reset when checked out from the pool (usually upon first access to ActiveRecord::Base.connection), and returned back to the pool after each request. If you would like to use connection pools outside of ActionPack, there is an ActiveRecord::Base.connection_pool method that gives you access to the pool, and you can manually checkout/checkin connections, or supply a block to ActiveRecord::Base.connection_pool.with_connection which takes care of the checkout/checkin for you. [#936 state:resolved]
| * translates when a message symbol has been set on builtin validationsIain Hecker2008-08-311-0/+33
| | | | | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Fix tests that assumed implicit order by idJeremy Kemper2008-08-301-2/+2
| |
| * Performance: Better query for ASSOCIATION_ids. Select only ids if the ↵miloops2008-08-303-16/+68
| | | | | | | | | | | | association hasn't been loaded. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Make NamedScope#size behave identically to AssociationCollection#size. [#933 ↵Tom Stuart2008-08-291-0/+15
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Make clear_active_connections! also return stale connections back to the poolNick Sieger2008-08-294-96/+87
| | | | | | | | - also clean up some cruft remaining from per-thread connection cache
* | Remove CachedConnectionPerThread per-thread pooling mechanism in favor of a ↵Nick Sieger2008-08-293-0/+7
| | | | | | | | fixed pool with default maximum of 5 connections
* | Deprecate allow_concurrency and make it have no effectNick Sieger2008-08-294-55/+7
| |
* | Fix typo: was using brackets instead of parens. Must need more sleep.Nick Sieger2008-08-291-0/+10
| |
* | Fix checkin method, add a couple more testsNick Sieger2008-08-291-4/+34
| |
* | Nearing the finish line. Initial fixed-size connection pool implemented, ↵Nick Sieger2008-08-291-0/+36
| | | | | | | | more docs
* | Introduce synchronization around connection pool accessNick2008-08-291-0/+4
| | | | | | | | | | | | - use new active support Module#synchronize - allow_concurrency now switches between a null monitor and a regular monitor (defaulting to null monitor to avoid overhead)
* | Rename defined_connections to connection_poolsNick2008-08-291-1/+1
| | | | | | | | | | - Distinguis meaning of "active_connections" to always mean connections associated with the current thread
* | Initial conversion to connection poolNick2008-08-291-24/+15
|/ | | | | | So far so good, tests still run clean. Next steps: synchronize connection pool access and modification, and change allow_concurrency to simply switch a real lock for a null lock.
* Make case insensitive validates_uniqueness_of use unicode aware downcase method.Eugene Pimenov2008-08-291-0/+12
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Fix parentheses warningsMichael Koziarski2008-08-291-1/+1
|
* Fix NamedScope regex so methods containing "an" get delegated to ↵Jan De Poorter2008-08-291-0/+4
| | | | | | proxy_found. [#901 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Merge scoped :joins together instead of overwriting them. May expose scoping ↵Andrew White2008-08-281-2/+79
| | | | | | | | bugs in your code! [#501 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support.Ernie Miller2008-08-281-0/+7
| | | | | | [#831 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Implement count limit/offset support for has_many associationsTarmo Tänav2008-08-271-0/+6
| | | | | | [#348 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Alias included associations if needed when doing a countTarmo Tänav2008-08-271-0/+4
| | | | | | [#302 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Dirty: treat two changes resulting in the original value as being unchanged.Tom Lea2008-08-271-0/+36
| | | | | | [#798 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge commit 'sven/i18n'Jeremy Kemper2008-08-271-12/+7
|\ | | | | | | | | Conflicts: activesupport/lib/active_support.rb
| * i18n: fixed failing tests after removing #populate and #store_translationsMarko Seppae2008-08-271-12/+7
| |
* | Fix two has_one :through errorspivotal2008-08-271-0/+9
|/ | | | | | | | * Set the association target on assignment; * Reset target to nil on reset, rather than empty array. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#895 state:committed]
* Fix yet another implicit order dependant testTarmo Tänav2008-08-261-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Just look at sql_type when testing that the correct database-specific type ↵Tarmo Tänav2008-08-261-4/+1
| | | | | | was used Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Include people and readers fixtures to fix test isolation errorJeremy Kemper2008-08-261-2/+2
|
* fix tests relying on implicit orderingJeremy Kemper2008-08-261-2/+3
|
* Include mysql older than 5.1.23 in the 5.1 series in the list of those that ↵Tarmo Tänav2008-08-261-1/+1
| | | | | | can't handle NULL defaults Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* um.. yeahJeremy Kemper2008-08-261-2/+2
|