Method: ApplicationHelper#link_to_section

Defined in:
lib/playmo/recipes/templates/application_helper_recipe/application_helper.rb


63
64
65
66
67
68
69
70
71
# File 'lib/playmo/recipes/templates/application_helper_recipe/application_helper.rb', line 63

def link_to_section(name, options = {}, html_options = {}, &block)
  url_string = url_for(options)

  if "/#{request.path.split('/')[1]}" == url_string
    html_options[:class] = "#{html_options[:class]} current"
  end

  link_to(name, options, html_options, &block)
end