Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- directory = "disease" #Creates a directory called disease
- FileUtils.mkpath(directory) # Makes the directory if it doesn't exists
- event = select * from Eightk WHERE text="cancer" OR text="dead"
- #What is the active record equivalent to this????
- event.each do |filing| #filing can be used instead of eightks
- filename = "#{directory}/#{filing.doc_id}.html"
- File.open(filename,"w").puts filing.text
- puts "Storing #{filing.doc_id}..."
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement