method

tag_string

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: TagBuilder
tag_string(name, content = nil, escape: true, **options, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/helpers/tag_helper.rb, line 69
        def tag_string(name, content = nil, escape: true, **options, &block)
          content = @view_context.capture(self, &block) if block_given?
          self_closing = SVG_SELF_CLOSING_ELEMENTS.include?(name)
          if (HTML_VOID_ELEMENTS.include?(name) || self_closing) && content.nil?
            "<#{name.to_s.dasherize}#{tag_options(options, escape)}#{self_closing ? " />" : ">"}".html_safe
          else
            content_tag_string(name.to_s.dasherize, content || "", options, escape)
          end
        end
Register or log in to add new notes.