Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. directory = "disease" #Creates a directory called disease
  2. FileUtils.mkpath(directory) # Makes the directory if it doesn't exists
  3.  
  4.  
  5. event = select * from Eightk WHERE text="cancer" OR text="dead"
  6. #What is the active record equivalent to this????
  7.  
  8.  
  9. event.each do |filing| #filing can be used instead of eightks
  10. filename = "#{directory}/#{filing.doc_id}.html"
  11. File.open(filename,"w").puts filing.text
  12. puts "Storing #{filing.doc_id}..."
  13.  
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement