提交 15720df1 编写于 作者: J Julian Simioni 提交者: Carlos Antonio da Silva

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]
上级 3df07d09
......@@ -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"
# )
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册