How does this helper work? (agile book)

Basically, tag_options() will create a set of html tag attributes from a hash:

tag_options({"id" => "cart", "style" => "color: black"})

will give you:

id="cart" style="color: black"

which is convenient to use in a tag:

<div id="cart" style="color: black">

stringify_keys is a method for hashes that converts any symbol keys to strings. For example {:id => "cart"} becomes {"id" => "cart"}

Hope that helps,

Steve