Module: Insightful::TooltipHelper

Defined in:
lib/insightful/tooltip_helper.rb

Instance Method Summary collapse

Instance Method Details

#insight(partial, options = {}) ⇒ Object

associates the “title” attribute of a node with a rendered partial



4
5
6
7
8
9
10
11
# File 'lib/insightful/tooltip_helper.rb', line 4

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