提交 b335def1 编写于 作者: R Robin Tweedie

use YAML.load_file in database tasks example

rather than YAML.load(File.read(path)). YAML.load_file is also used in
guides/rails_guides/helper.rb since 2011, the only other precedent I could find.
上级 a230530b
......@@ -28,7 +28,7 @@ class DatabaseNotSupported < StandardError; end # :nodoc:
# Example usage of +DatabaseTasks+ outside Rails could look as such:
#
# include ActiveRecord::Tasks
# DatabaseTasks.database_configuration = YAML.load(File.read('my_database_config.yml'))
# DatabaseTasks.database_configuration = YAML.load_file('my_database_config.yml')
# DatabaseTasks.db_dir = 'db'
# # other settings...
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册