Using web scraper to update model in rails db
I have gone through the web scraping tutorial and found it to be extremely thorough and a great help. I am trying to use my web scrape to update a model in my database instead of generating a csv file. The guidelines recommend not posting the code I have created so I would appreciate it if you could help me figure out how to correctly update the models. I created a rake task in lib/tasks with code similar to the code explained in the tutorial. I included WebVideo.update_attribute(:title, title) at the end of the loop, and used WebVideo.all.each do |video| to begin the loop. If this doesn't make sense I can create a stackoverflow showing my code. Thanks for taking the time to help.
Posted over 4 years ago by