Skip to content

Commit

Permalink
Use Sqlite3 adapter in examples
Browse files Browse the repository at this point in the history
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
orangejulius authored and carlosantoniodasilva committed Mar 13, 2014
1 parent 71662c8 commit 2f19263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/lib/active_record/connection_handling.rb
Expand Up @@ -15,14 +15,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"
# )
#
Expand Down

0 comments on commit 2f19263

Please sign in to comment.