Module: EaselHelpers::Helpers::StructureHelper
- Included in:
- EaselHelpers::Helpers
- Defined in:
- lib/easel_helpers/helpers/structure_helper.rb
Instance Method Summary collapse
Instance Method Details
#blockquote(*args, &block) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/easel_helpers/helpers/structure_helper.rb', line 5 def blockquote(*args, &block) = args. = .delete(:author) option_quote = textilize(.delete(:quote)) bq = content_tag :blockquote, option_quote.blank? ? capture(&block) : option_quote html = if content_tag :div, bq + content_tag(:cite, ), :class => "quote-cited" else bq end concat(html) end |
#body(*args) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/easel_helpers/helpers/structure_helper.rb', line 24 def body(*args) = args. @_page_body_attributes ||= {} css_classes = [] << @_page_body_attributes.delete(:class) << args @_page_body_attributes = @_page_body_attributes.merge() @_page_body_attributes[:class] = clean_css_classes(css_classes) if block_given? block = lambda { yield } html = content_tag(:body, capture(&block), @_page_body_attributes) concat(html) end end |