Sha256: 7174c9450930cd2eca7916aa22009e25ed49281f4d0ef0a1256c8f2c144e4c60

Contents?: true

Size: 323 Bytes

Versions: 5

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).optimized
      end
    end
  end

  Template.register_default_template_handler :slim, TemplateHandlers::SlimHandler
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slim-0.6.1 lib/slim/rails.rb
slim-0.6.0 lib/slim/rails.rb
slim-0.6.0.beta.3 lib/slim/rails.rb
slim-0.6.0.beta.2 lib/slim/rails.rb
slim-0.6.0.beta.1 lib/slim/rails.rb