aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Create mysql binary_fields table with latin1 character set as with utf8 all ↵Tarmo Tänav2008-08-261-2/+2
| | | | | | the limits would have to be divided by 3 to get the expected text types Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* 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
|
* typoJeremy Kemper2008-08-261-2/+2
|
* fix another ordering failureJeremy Kemper2008-08-261-1/+1
|
* fix tests relying on implicit orderingJeremy Kemper2008-08-251-4/+2
|
* add dynamic finder bang version to raise RecordNotFoundJosh Susser2008-08-251-0/+14
| | | | | | [#905 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* refactor dynamic finder name matching into its own classJosh Susser2008-08-251-0/+42
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* ensure tests load sibling Active Support instead of a gemJeremy Kemper2008-08-251-0/+1
|
* Load the first and not the last has_one result when doing join-based eager ↵Tarmo Tänav2008-08-252-0/+16
| | | | | | | | | | | loading This matters when the has_one is defined with an order in which case there is an expectation that the first one will be loaded. [#904 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Implement old-skool eagerloading for has_one :throughFrederick Cheung2008-08-251-0/+16
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix preloading of has_one through associationsFrederick Cheung2008-08-251-5/+9
| | | | | | [#903 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* strip trailing whitespaceJeremy Kemper2008-08-251-157/+157
|
* Ruby 1.9 compat: fix test error masked by old String#each behaviorJeremy Kemper2008-08-251-1/+1
|
* I18n: fix activerecord i18n test for classy backendSven Fuchs2008-08-251-1/+1
|