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

Don’t enable by default, because its a performance regression. :( def link_to(*args, &block)

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

end



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

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


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

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