Module Innate::Helper::Link
In: lib/innate/helper/link.rb

Methods

a   anchor   included   r   route   route_location   route_self   rs  

Public Class methods

Public Instance methods

a(text, *args)

Alias for anchor

Create a link tag

Usage, given Wiki is mapped to `/wiki`:

  Wiki.a(:home)                   # => '<a href="/wiki/home">home</a>'
  Wiki.a('home', :home)           # => '<a href="/wiki/home">home</a>'
  Wiki.a('home', :/)              # => '<a href="/wiki/">home</a>'
  Wiki.a('foo', :/, :foo => :bar) # => '<a href="/wiki/?foo=bar">foo</a>'
  Wiki.a('example', 'http://example.com')
  # => '<a href="http://example.com">example</a>'

@return [String]

r(name = '/', *args)

Alias for route

Provide the path to given Node and actions. Escapes GET parameters.

Usage, mapping is Pages => ’/’, Users => ’/users’:

  Pages.r                       # => URI('/')
  Pages.r(:foo)                 # => URI('/foo')
  Pages.r(:foo, :bar)           # => URI('/foo/bar')
  Pages.r(:foo, :a => :b)       # => URI('/foo?a=b')
  Pages.r(:foo, :bar, :a => :b) # => URI('/foo/bar?a=b')

  Users.r                       # => URI('/users/')
  Users.r(:foo)                 # => URI('/users/foo')
  Users.r(:foo, :bar)           # => URI('/users/foo/bar')
  Users.r(:foo, :a => :b)       # => URI('/users/foo?a=b')
  Users.r(:foo, :bar, :a => :b) # => URI('/users/foo/bar?a=b')

@return [URI] to the location

Create a route to the currently active Node.

This method is mostly here in case you include this helper elsewhere and don‘t want (or can‘t) type SomeNode.r all the time.

The usage is identical with {route}.

@param [to_s] name @return [URI] to the location @see Ramaze::Helper::Link#route @author manveru

rs(name = '/', *args)

Alias for route_self

[Validate]