Skip to content
Browse files

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]
  • Loading branch information...
1 parent 3df07d0 commit 15720df1808b249bae91e5600d6f0676990a7de0 @orangejulius orangejulius committed with carlosantoniodasilva Mar 12, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_handling.rb
View
4 activerecord/lib/active_record/connection_handling.rb
@@ -18,14 +18,14 @@ module ConnectionHandling
# 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"
# )
#

0 comments on commit 15720df

Please sign in to comment.
Something went wrong with that request. Please try again.