Commit 29e357b54bcb14d5f16433837d4a6c9ffafb0de3

Authored by Andrey Karpikov
1 parent 8f089990

check menu selected

... ... @@ -49,6 +49,7 @@ module Kanjai
49 49 if current_page
50 50 content = content.gsub('###link###', current_page.menu_url(session[:scheme], lang = nil).to_s)
51 51 .gsub('###title###', current_page.lang_attributes(I18n.locale, :title).to_s)
  52 + .gsub('###active_class###', 'active')
52 53 end
53 54 subparts << content
54 55 when 'repeat'
... ... @@ -160,7 +161,8 @@ module Kanjai
160 161 if current_page
161 162 attributes = replace_attributes_marker(attributes, {
162 163 '###link###' => current_page.menu_url(session[:scheme], lang = nil),
163   - '###title###' => current_page.lang_attributes(I18n.locale, :title)
  164 + '###title###' => current_page.lang_attributes(I18n.locale, :title),
  165 + '###active_class###' => 'active'
164 166 })
165 167 end
166 168 subparts.send(item[:name].to_s, attributes) do |next_subparts|
... ...
1 1 module Kanjai
2   - VERSION = "0.0.369"
  2 + VERSION = "0.0.370"
3 3 end
... ...