added class option to nav_entry

This commit is contained in:
nilsding 2014-12-13 19:28:46 +01:00
parent 025507c258
commit 062d458363
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,8 @@ module ApplicationHelper
options = {
badge: nil,
badge_color: nil,
icon: nil
icon: nil,
class: ''
}.merge(options)
unless options[:icon].nil?
@ -17,7 +18,7 @@ module ApplicationHelper
}"))}"
end
content_tag(:li, link_to(body.html_safe, path), class: ('active' if current_page? path))
content_tag(:li, link_to(body.html_safe, path), class: ("#{'active ' if current_page? path}#{options[:class]}"))
end
##