summaryrefslogtreecommitdiff
path: root/app/helpers/link_helper.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-01 14:46:04 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-01 14:46:04 +0200
commit1384756b81c719f899359efc9125e80fae8614c0 (patch)
treec8141fedeb7a03f646111177585ac05321e5f981 /app/helpers/link_helper.rb
parent52e260a4d7e3ac93c203bda716c37207d5f6cbbb (diff)
Allow aggregate to order by slug and paint chapters list more nicely
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(