aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-09-02 18:21:36 +0200
committerJeremy Kemper <jeremy@bitsweat.net>2008-09-02 18:32:54 +0200
commit6f932b4790371e548c0df9033da96b2cf8f51dcc (patch)
treeb62c70a90a1716f49df5630e14ef1d847e7a7138 /railties/lib
parent300754509b6990b387b056c122e90f50a79eeb81 (diff)
parentebfa43c423ac16bb699424d8d3db11855dd79a91 (diff)
downloadrails-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 'railties/lib')
-rw-r--r--railties/lib/initializer.rb2
-rw-r--r--railties/lib/tasks/documentation.rake4
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 4c1f96d505..74d2daa34b 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -488,7 +488,7 @@ Run `rake gems:install` to install the missing gems.
# If assigned value cannot be matched to a TimeZone, an exception will be raised.
def initialize_time_zone
if configuration.time_zone
- zone_default = Time.send!(:get_zone, configuration.time_zone)
+ zone_default = Time.__send__(:get_zone, configuration.time_zone)
unless zone_default
raise %{Value assigned to config.time_zone not recognized. Run "rake -D time" for a list of tasks for finding appropriate time zone names.}
end
diff --git a/railties/lib/tasks/documentation.rake b/railties/lib/tasks/documentation.rake
index f4927a0ef1..4ef838626a 100644
--- a/railties/lib/tasks/documentation.rake
+++ b/railties/lib/tasks/documentation.rake
@@ -1,9 +1,9 @@
namespace :doc do
- desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb"
+ desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
Rake::RDocTask.new("app") { |rdoc|
rdoc.rdoc_dir = 'doc/app'
rdoc.template = ENV['template'] if ENV['template']
- rdoc.title = "Rails Application Documentation"
+ rdoc.title = ENV['title'] || "Rails Application Documentation"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.options << '--charset' << 'utf-8'
rdoc.rdoc_files.include('doc/README_FOR_APP')