data parsed to database Nokogiri rails
- by Charlie Allombert
So I'm just getting started with Nokogiri and Rails
I have the following which returns the name of someone.
TEST.rb:
require 'nokogiri'
require 'open-uri'
url = "http://www.imdb.com/title/tt1439629/"
doc = Nokogiri::HTML(open(url))
puts doc.css("div#wrapper [...too long...]")[0].text
Now I created a table in my DB on rails and want to send the returned name to the actor table in the name column! How would I do that ? I can't seem to find atutorial on this...
My goal would eventually be to have a rails form where I'd input an IMDB link which would return title and so on...
(Also I'm new to ruby rails and programming so please provide easy info!)