Permalink
Browse files

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.
  • Loading branch information...
1 parent a230530 commit b335def167f1141995810d32d700ef3f4d036cd4 Robin Tweedie committed Apr 15, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/tasks/database_tasks.rb
@@ -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...
#

0 comments on commit b335def

Please sign in to comment.