module JasperHelpers::Links

Direct including types

Defined in:

jasper_helpers/links.cr

Instance Method Summary

Instance Method Detail

def button_to(body : String, url : String, method : Symbol = :post) #

[View source]
def button_to(body : String, url : String, method : Symbol = :post, &) #

[View source]
def button_to(body : String, url : String, method : Symbol = :post, **options : Object) #

[View source]
def button_to(body : String, url : String, method : Symbol = :post, **options : Object, &) #

[View source]
def link_to(body : String, url : String) #

Creates an anchor,<a />, tag rendering the body parameter as content. The anchor tag's href will be set to the url parameter provided. The options parameter is be used to provide additional configurations or attributes for the tag.

Example:

 link_to("Go to GitHub", "http://github.com", { id: "github-url" })

Produces:

 <a href="http://github.com" id="github-url">Go to GitHub</a>

With the exception of not accepting tag options


[View source]
def link_to(body : String, url : String, **options : Object) #

Creates an anchor,<a />, tag rendering the body parameter as content. The anchor tag's href will be set to the url parameter provided. The options parameter is be used to provide additional configurations or attributes for the tag.

Example:

 link_to("Go to GitHub", "http://github.com", { id: "github-url" })

Produces:

 <a href="http://github.com" id="github-url">Go to GitHub</a>

[View source]
def link_to(url : String, &) #

Creates an anchor,<a />, tag with the href attribute set to the url parameter provided. The options parameter can be used to provide additional configurations or attributes for the tag.

Example:

 link_to("http://github.com", { id: "github-url" })

Produces:

 <a href="http://github.com" id="github-url"/>

With the exception of not accepting tag options


[View source]
def link_to(url : String, **options : Object, &) #

Creates an anchor,<a />, tag with the href attribute set to the url parameter provided. The options parameter can be used to provide additional configurations or attributes for the tag.

Example:

 link_to("http://github.com", { id: "github-url" })

Produces:

 <a href="http://github.com" id="github-url"/>

[View source]