Sha256: 729e3e9ca7f2368542bf4ddfb77e85f943bcaa3ffd914b0536488788e9ae4f69
Contents?: true
Size: 676 Bytes
Versions: 10
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true module BootstrapLeather # Tabs, like the tabs of a folder module TabsHelper def add_tab(label, id, args = {}, &block) active = false if @tabs.nil? @tabs = [] active = true end before_link = args[:before_link] ? args[:before_link] : '' @tabs << { id: id, label: label, active: active, before_link: before_link, content: capture(&block) } end def render_tabs(orientation = 'top') tabs = @tabs @tabs = nil render( partial: 'bootstrap_leather/tabs/tabs', locals: { tabs: tabs, orientation: orientation } ) end end end
Version data entries
10 entries across 10 versions & 1 rubygems