Module: BootstrapLinkHelper

Defined in:
app/helpers/bootstrap_link_helper.rb

Overview

RAILS BOOTSTRAP ENGINE

Bootstrap Link

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

Alias para link_to_cancel



50
51
52
# File 'app/helpers/bootstrap_link_helper.rb', line 50

def link_to_back title, link, opts={}
	link_to_cancel title, link, opts
end

Cria um link para voltar

<a href=“link”><i class=“icon-name”></i> title</a>



39
40
41
# File 'app/helpers/bootstrap_link_helper.rb', line 39

def link_to_cancel title, link, opts={}
	link_to title, link, opts
end

Cria um link para apagar registros

<a href=“link”><i class=“icon-name”></i> title</a>



74
75
76
77
78
# File 'app/helpers/bootstrap_link_helper.rb', line 74

def link_to_delete title, link, opts={}
	opts[:method] = :delete
	opts[:data] = { confirm: 'Tem certeza que deseja apagar este registro?' }  	
	link_to raw(icon(:trash) + " #{title}"), link, opts
end

Cria um link para editar registros

<a href=“link”><i class=“icon-name”></i> title</a>



26
27
28
# File 'app/helpers/bootstrap_link_helper.rb', line 26

def link_to_edit title, link, opts={}
	link_to raw(icon(:pencil) + " #{title}"), link, opts
end

Cria um link para novos registros

<a href=“link”><i class=“icon-name”></i> title</a>



62
63
64
# File 'app/helpers/bootstrap_link_helper.rb', line 62

def link_to_new title, link, opts={}
	link_to raw(icon(:plus) + " #{title}"), link, opts
end