demarches-normaliennes/app/helpers/tabs_helper.rb
2018-08-16 16:36:37 +02:00

15 lines
438 B
Ruby

module TabsHelper
def tab_item(label, url, active: false, badge: nil, notification: false)
render partial: 'shared/tab_item', locals: {
label: label,
url: url,
active: active,
badge: badge,
notification: notification
}
end
def active_tab_item(label, url, badge: nil, notification: false)
tab_item(label, url, active: current_page?(url), badge: badge, notification: notification)
end
end