added class option to nav_entry
This commit is contained in:
parent
025507c258
commit
062d458363
|
@ -3,7 +3,8 @@ module ApplicationHelper
|
||||||
options = {
|
options = {
|
||||||
badge: nil,
|
badge: nil,
|
||||||
badge_color: nil,
|
badge_color: nil,
|
||||||
icon: nil
|
icon: nil,
|
||||||
|
class: ''
|
||||||
}.merge(options)
|
}.merge(options)
|
||||||
|
|
||||||
unless options[:icon].nil?
|
unless options[:icon].nil?
|
||||||
|
@ -17,7 +18,7 @@ module ApplicationHelper
|
||||||
}"))}"
|
}"))}"
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue