summaryrefslogtreecommitdiff
path: root/app/helpers/link_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/link_helper.rb')
-rw-r--r--app/helpers/link_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb
index 2121133e..21e4da59 100644
--- a/app/helpers/link_helper.rb
+++ b/app/helpers/link_helper.rb
@@ -21,8 +21,9 @@ module LinkHelper
21 active = (page_path == path.sub(/^\//, "")) 21 active = (page_path == path.sub(/^\//, ""))
22 end 22 end
23 23
24 active_class = active ? {:class => 'active'} : {:class => 'inactive'} 24 html_options = html_options.merge(
25 html_options = html_options.merge(active_class) 25 :class => [html_options[:class], active ? "active" : "inactive"].compact.join(" ")
26 )
26 locale = (params[:locale] || I18n.locale).to_sym == I18n.default_locale ? nil : (params[:locale] || I18n.locale) 27 locale = (params[:locale] || I18n.locale).to_sym == I18n.default_locale ? nil : (params[:locale] || I18n.locale)
27 28
28 link_to( 29 link_to(