lib/action_view/helpers/css_browser_selector.rb
# Underlying content builder for both the +html+ and +body+ functions
Underlying content builder for both the +html+ and +body+ functions
Underlying content builder for both the + html + and + body + functions
def add_css_browser_selectors_to_tag(tag, html_options = {}, &block)
        html_options ||= {}
        exclude_browser_and_os = html_options.delete(:exclude_browser_and_os)
        unless exclude_browser_and_os or (bros = determine_browser_and_os).empty? or controller.page_cached?
          html_options[:class] = html_options[:class] ? "#{html_options[:class]} #{bros}" : bros
        end
        content = content_tag tag,
                  (controller.page_cached? ? "\n" + javascript_tag(css_browser_selector(tag, false)) : "") +
                  (capture(&block) if block_given?),
                  html_options
        method(:concat).arity == 2 ? concat(content, block.binding) : concat(content)
      end
def add_css_browser_selectors_to_tag ( tag , html_options = { } , & block ) html_options ||= { } exclude_browser_and_os = html_options . delete ( :exclude_browser_and_os ) unless exclude_browser_and_os or ( bros = determine_browser_and_os ) . empty? or controller . page_cached? html_options [ :class ] = html_options [ :class ] ? "#{html_options[:class]} #{bros}" : bros end content = content_tag tag , ( controller . page_cached? ? "\n" + javascript_tag ( css_browser_selector ( tag , false ) ) : "" ) + ( capture ( & block ) if block_given? ) , html_options method ( :concat ) . arity == 2 ? concat ( content , block . binding ) : concat ( content ) end
Underlying content builder for both the +html+ and +body+ functions
Underlying content builder for both the + html + and + body + functions
tag
html_options
block