Module: BootstrapPopoverHelper

Defined in:
app/helpers/bootstrap_popover_helper.rb

Overview

RAILS BOOTSTRAP ENGINE

Bootstrap Popovers twitter.github.com/bootstrap/javascript.html#popovers

Copyright 2012-2013 Luiz Eduardo de Oliveira Fonseca, Agência Orangeweb

Licensed under The MIT License

opensource.org/licenses/MIT

Instance Method Summary collapse

Instance Method Details

#popover(title, content, options = {}) ⇒ Object

Generates bootstrap popover markup

<a href=“#” rel=“popover” data-content=“Some Content” data-original-title=“A Title”> Title </a>



44
45
46
47
48
# File 'app/helpers/bootstrap_popover_helper.rb', line 44

def popover title, content, options={}
	options[:rel] = :popover
	options[:data] = { :content => content, "original-title" => title }
	link_to title, "#", options
end

Generates bootstrap popover markup

<a href=“#” rel=“tooltip” title=“Tooltip Text”>Title</a>



28
29
30
31
# File 'app/helpers/bootstrap_popover_helper.rb', line 28

def tooltip_link_to title, link, opts={}
	opts[:rel] = :tooltip
	link_to title, link, opts
end