Commit 29e357b54bcb14d5f16433837d4a6c9ffafb0de3

Authored by Andrey Karpikov
1 parent 8f089990

check menu selected

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