diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-02 18:21:36 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-02 18:32:54 +0200 |
commit | 6f932b4790371e548c0df9033da96b2cf8f51dcc (patch) | |
tree | b62c70a90a1716f49df5630e14ef1d847e7a7138 /actionpack/lib/action_controller/routing/route_set.rb | |
parent | 300754509b6990b387b056c122e90f50a79eeb81 (diff) | |
parent | ebfa43c423ac16bb699424d8d3db11855dd79a91 (diff) | |
download | rails-6f932b4790371e548c0df9033da96b2cf8f51dcc.tar.gz rails-6f932b4790371e548c0df9033da96b2cf8f51dcc.tar.bz2 rails-6f932b4790371e548c0df9033da96b2cf8f51dcc.zip |
Database connections are now pooled, one pool per #establish_connection call.
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]
Diffstat (limited to 'actionpack/lib/action_controller/routing/route_set.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing/route_set.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing/route_set.rb b/actionpack/lib/action_controller/routing/route_set.rb index 8dfc22f94f..9d48f289db 100644 --- a/actionpack/lib/action_controller/routing/route_set.rb +++ b/actionpack/lib/action_controller/routing/route_set.rb @@ -115,7 +115,7 @@ module ActionController def install(destinations = [ActionController::Base, ActionView::Base], regenerate = false) reset! if regenerate Array(destinations).each do |dest| - dest.send! :include, @module + dest.__send__(:include, @module) end end @@ -353,7 +353,7 @@ module ActionController if generate_all # Used by caching to expire all paths for a resource return routes.collect do |route| - route.send!(method, options, merged, expire_on) + route.__send__(method, options, merged, expire_on) end.compact end @@ -361,7 +361,7 @@ module ActionController routes = routes_by_controller[controller][action][options.keys.sort_by { |x| x.object_id }] routes.each do |route| - results = route.send!(method, options, merged, expire_on) + results = route.__send__(method, options, merged, expire_on) return results if results && (!results.is_a?(Array) || results.first) end end |