Module: Spyro::ActionViewExtension::ContainerHelper

Included in:
WidgetsHelper
Defined in:
lib/spyro/helpers/action_view_extension.rb

Instance Method Summary collapse

Instance Method Details

#box(opts = {}, &block) ⇒ Object



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/spyro/helpers/action_view_extension.rb', line 129

def box opts = {}, &block
  @inside_box = true
  opts[:html] ||= {}
  opts[:html][:class] = [*opts[:html][:class], "panel", "panel-default"]
  content = capture_haml do
    haml_tag :div, opts[:html] do
      #        haml_tag :div, :class => "caption" do
      content = capture(&block)
      haml_concat content
      #       end
    end
  end
  @inside_box = false
  content
end