module Insightful module TooltipHelper # associates the "title" attribute of a node with a rendered partial def insight(partial, options = {}) if options.has_key?(:class) options[:class] << " insightful" else options[:class] = "insightful" end {:title => (render :partial => partial).to_s}.merge!(options) end end end