Module: Bard::Static::LinkToHelper

Defined in:
app/helpers/bard/static/link_to_helper.rb

Defined Under Namespace

Classes: LinkTo, LinkToCurrent, LinkToNav

Instance Method Summary collapse

Instance Method Details



4
5
6
7
# File 'app/helpers/bard/static/link_to_helper.rb', line 4

def link_to(*args, &block)
  args.unshift capture(&block) if block_given?
  LinkTo.render(self, *args)
end


9
10
11
12
13
14
# File 'app/helpers/bard/static/link_to_helper.rb', line 9

def link_to_current(*args, &block)
  args.unshift capture(&block) if block_given?
  LinkToCurrent.render(self, *args) do |link|
    link.current_path = request.fullpath
  end
end


16
17
18
19
20
21
# File 'app/helpers/bard/static/link_to_helper.rb', line 16

def link_to_nav(*args, &block)
  args.unshift capture(&block) if block_given?
  LinkToNav.render(self, *args) do |link|
    link.current_path = request.fullpath
  end
end