module ActionView::Helpers::TagHelper

Public Instance Methods

content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, translate = true , &block) click to toggle source
# File lib/amelia/action_view/helpers/tag_helper.rb, line 11
def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, translate = true , &block)
  if block_given?
    options = content_or_options_with_block if content_or_options_with_block.is_a?(Hash)
    content_tag_string(name, capture(&block), options, escape)
  else
    content_tag_string(name, content_or_options_with_block, options, escape, translate)
  end
end

Private Instance Methods

content_tag_string(name, content, options, escape = true, translate = true ) click to toggle source
# File lib/amelia/action_view/helpers/tag_helper.rb, line 22
def content_tag_string(name, content, options, escape = true, translate = true )
  tag_options = tag_options(options, escape) if options
  if translate
    content = content.internationalization @virtual_path
  end
  content     = ERB::Util.unwrapped_html_escape(content) if escape
  "<#{name}#{tag_options}>#{PRE_CONTENT_STRINGS[name.to_sym]}#{content}</#{name}>".html_safe
end