Top Level Namespace

Defined Under Namespace

Modules: Buildybuild

Instance Method Summary collapse

Instance Method Details



1
2
3
4
5
6
# File 'lib/generators/buildybuild/active_link/templates/active_link_helper.rb', line 1

def active_link_to(text, path, options={})
  if /^#{url_for(path)}/ =~ request.path
    options[:class] = "#{options[:class]} active"
  end
  link_to text, path, options
end