mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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.
This commit is contained in:
parent
a230530bb7
commit
b335def167
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ module ActiveRecord
|
|||
# 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...
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue