Ruby on Rails problems & solutions - Dec 8, 2010


December 9, 2010

There are no stupid questions

Before you crawl under your rock, remember that someone else will someday will find your stupid question, with the stupid answer, and bless you for it. (That someone else would be ME, today)

https://www.ruby-forum.com/topic/173184

And remember, there are no stupid questions.  There are, however, a lot of annoying people who will tell you that your question is stupid.  Rest assured, they, too, have asked stupid questions.  I can practically guarantee it.  

Nokogiri Parsing

I’ve done some XML parsing in the past, but I used XMLSimple.  Now, all the cool kids use Nokogiri, so…

http://nokogiri.org/tutorials/searching_a_xml_html_document.html

As you can see, you can make Nokogiri respond like XMLSimple… but it’s not recommended. I think I prefer CSS over XPath, but that’s just me. 


} else { $('#cookie-notice').show(); } $('#cookie-notice-accept').click(function() { createCookie('cookie-notice-dismissed','true',365); // Change from 1 month to 1 year. $('#cookie-notice').hide(); });