diff options
author | Glenn Gillen <me@glenngillen.com> | 2011-06-28 19:49:31 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-07-20 16:23:31 -0700 |
commit | 1f427b534199399545f90fd0895d62c005247501 (patch) | |
tree | 9e7d80b1f04674acbbfad67abc86fa93831316cc | |
parent | 16249feaab136326ce1a74bb5602517d8d161b6b (diff) | |
download | rails-1f427b534199399545f90fd0895d62c005247501.tar.gz rails-1f427b534199399545f90fd0895d62c005247501.tar.bz2 rails-1f427b534199399545f90fd0895d62c005247501.zip |
Add documentation for URL connection strings.
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index c34bb55054..ca83173d3a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -46,6 +46,12 @@ module ActiveRecord # "database" => "path/to/dbfile" # ) # + # Or a URL: + # + # ActiverRecord::Base.establish_connection( + # "postgres://myuser:mypass@localhost/somedatabase" + # ) + # # The exceptions AdapterNotSpecified, AdapterNotFound and ArgumentError # may be returned on an error. def self.establish_connection(spec = nil) |