Sha256: 5860702ec9413784482ae2d9d111df56c3ca42af9355438adcd9605529df0f7f

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
insightful-0.0.1.6 lib/insightful/tooltip_helper.rb
insightful-0.0.1.5 lib/insightful/tooltip_helper.rb