[Rails] initialization of new model objects in Rails

2012-12-19 Thread Dan Brooking
Hey guys... having an issue that hopefully someone can help with. I have a ActiveRecord model called WebPage, it has two fields - url and title. I want the title to be determined by parsing the html (I'm using Nokogiri) - and this is where I'm having issues. My code looks something like:

Re: [Rails] initialization of new model objects in Rails

2012-12-19 Thread Walter Lee Davis
On Dec 19, 2012, at 4:46 PM, Dan Brooking wrote: Hey guys... having an issue that hopefully someone can help with. I have a ActiveRecord model called WebPage, it has two fields - url and title. I want the title to be determined by parsing the html (I'm using Nokogiri) - and this is

Re: [Rails] initialization of new model objects in Rails

2012-12-19 Thread Dan Brooking
Wow... you have no idea how long I've been staring at this. That's exactly what it was.. changed @doc to doc and that did it. I do have some code for parsing out the NodeSet just removed it for simplicity in my code. However, my code isn't as clean as what you have so I'll play around with