Sha256: bd249e666ded5ec15706705f8895a3063663f13810f59209fc766ebb7bac4e49

Contents?: true

Size: 409 Bytes

Versions: 12

Compression:

Stored size: 409 Bytes

Contents

module ApplicationHelper
    module Amp::FallbackTagHelper

        def amp_fallback(name, options = {}, &block)
            options = options.symbolize_keys
            options.merge(fallback: "")

            if block_given?
                content_tag(name, capture(&block), options)
            else
                content_tag(name, nil, options)
            end
        end

    end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
amp-html-0.7.18 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.17 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.16 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.15 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.14 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.13 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.12 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.11 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.10 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.9 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.8 lib/generators/templates/helpers/amp/fallback_tag_helper.rb
amp-html-0.7.7 lib/generators/templates/helpers/amp/fallback_tag_helper.rb