From 1384756b81c719f899359efc9125e80fae8614c0 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 1 Aug 2026 14:46:04 +0200 Subject: Allow aggregate to order by slug and paint chapters list more nicely --- app/helpers/link_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/helpers/link_helper.rb') 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 active = (page_path == path.sub(/^\//, "")) end - active_class = active ? {:class => 'active'} : {:class => 'inactive'} - html_options = html_options.merge(active_class) + html_options = html_options.merge( + :class => [html_options[:class], active ? "active" : "inactive"].compact.join(" ") + ) locale = (params[:locale] || I18n.locale).to_sym == I18n.default_locale ? nil : (params[:locale] || I18n.locale) link_to( -- cgit v1.3