Sha256: c394a9d74a52296c021eb815eb99d113bad1d367af821a8791721c52bf6d097d

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

module Meta2
  module Helpers
    module ActionViewExtension
      def meta_tags
        resolver = instance_variable_get "@#{Meta2.config.assign_name}"

        html_source = resolver.detect.to_html(resolver.context)
        unless Rails.env.production?
          asist_message = resolver.options[:prefixes].map do |prefix|
            '%s.%s' % [prefix, resolver.options[:template]]
          end.join "\n"
          html_source += "<!--Meta2 path hinting.\n#{asist_message} -->\n"
        end
        html_source.html_safe
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
meta2-0.0.3 lib/meta2/helpers/action_view_extension.rb
meta2-0.0.2 lib/meta2/helpers/action_view_extension.rb