Sha256: 223a8b24819ae8e4e50bd2a374463ebdbb6360bf468a73354caaaf688e7a26c4
Contents?: true
Size: 684 Bytes
Versions: 10
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true module BootstrapLeather # Widgets (my term, not bootstrap's), such as a right sidebar with separate # sections module WidgetsHelper def add_widget(html_options = {}, &block) @widgets ||= [] @widgets << { html_options: html_options, body: capture(&block) } end def widgets mine = @widgets @widgets = nil mine end def render_widgets(device_class = 'md', column_width = 3) render( partial: 'bootstrap_leather/widgets/widgets', locals: { widgets: widgets, column_width: column_width, device_class: device_class } ) end end end
Version data entries
10 entries across 10 versions & 1 rubygems