Module: Tenon::ActiveLinkToHelper

Defined in:
app/helpers/tenon/active_link_to_helper.rb

Instance Method Summary collapse

Instance Method Details



3
4
5
6
7
# File 'app/helpers/tenon/active_link_to_helper.rb', line 3

def active_link_to(name = nil, options = {}, html_options = nil, &block)
  options[:class] = '' unless options[:class].present?
  options[:class] += ' --is-active' if name == request.original_fullpath
  link_to(name, options, html_options, &block)
end