Sha256: 16c48e0956aaebdf2896bf55d0819789ec2ced40a62a8160409f6bfdd279d116

Contents?: true

Size: 323 Bytes

Versions: 2

Compression:

Stored size: 323 Bytes

Contents

require 'slim'

module ActionView
  module TemplateHandlers
    class SlimHandler < TemplateHandler
      include Compilable

      def compile(template)
        return Slim::Engine.new(template.source).compiled
      end
    end
  end

  Template.register_default_template_handler :slim, TemplateHandlers::SlimHandler
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slim-0.2.0 lib/slim/rails.rb
slim-0.1.0 lib/slim/rails.rb