diff options
author | Julian Simioni <julian.simioni@gmail.com> | 2014-03-12 15:24:02 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-12 22:35:28 -0300 |
commit | 15720df1808b249bae91e5600d6f0676990a7de0 (patch) | |
tree | d3cef7093409869911a147455b45ce073d2e5bb6 /activerecord | |
parent | 3df07d093a1e4207caa63fd2e3b67599211f5800 (diff) | |
download | rails-15720df1808b249bae91e5600d6f0676990a7de0.tar.gz rails-15720df1808b249bae91e5600d6f0676990a7de0.tar.bz2 rails-15720df1808b249bae91e5600d6f0676990a7de0.zip |
Use Sqlite3 adapter in examples
Two bits of example code use sqlite as an adapter, which doesn't exist.
Using the code verbatim will raise a LoadError exception:
ActiveRecord::Base.establish_connection(
"adapter" => "sqlite",
"database" => "db.sqlite"
)
# => LoadError: Could not load 'active_record/connection_adapters/sqlite_adapter'...
Considering this is code a lot of people new to Rails might be running,
it's especially confusing.
Closes #14367 [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_handling.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index 4ba4e09777..bbb866cedf 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -18,14 +18,14 @@ module ActiveRecord # Example for SQLite database: # # ActiveRecord::Base.establish_connection( - # adapter: "sqlite", + # adapter: "sqlite3", # database: "path/to/dbfile" # ) # # Also accepts keys as strings (for parsing from YAML for example): # # ActiveRecord::Base.establish_connection( - # "adapter" => "sqlite", + # "adapter" => "sqlite3", # "database" => "path/to/dbfile" # ) # |