i want to add a current_item class to an active devise navigation, like login, registration etc. the menu consists also of some static pages, which are generated by the high_voltage gem. here i set it by the active page id and a class in the body tag.
how can i realize this for the 开发者_开发技巧devise navigation? any advice?
thanks
fixed it myself with a helper in application_helper.rb
def set_title
if controller_name == "registrations" && action_name == "new"
"mitmachen"
elsif controller_name == "sessions" && action_name == "new"
"login"
else
params[:id]
end
end
精彩评论