Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion elasticsearch-rails/lib/rails/templates/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

Zlib::GzipReader.open(File.expand_path('../articles.yml.gz', __FILE__)) do |gzip|
puts "Reading articles from gzipped YAML..."
@documents = YAML.load_documents(gzip.read)
@documents = YAML.respond_to?(:load_documents) ? YAML.load_documents(gzip.read) :
YAML.load_stream(gzip.read)
end

# Truncate the default ActiveRecord logger output
Expand Down