Sha256: 756447417c5b998c1712f49343846dbf836e6a05310cf440d5c56e52cda1d773

Contents?: true

Size: 483 Bytes

Versions: 2

Compression:

Stored size: 483 Bytes

Contents

module Tuning
  module Extensions
    module ActionView
      module Handlers
        extend ActiveSupport::Concern

        class Ruby

          def call(template)
            if template.type.json?
              <<-STRING
                output = begin
                  #{template.source}
                end
                output.to_json
              STRING
            else
              template.source
            end
          end

        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tuning-5.1.0 lib/tuning/extensions/action_view/handlers.rb
tuning-4.0.1.2 lib/tuning/extensions/action_view/handlers.rb