Sha256: b86d87718018957b6159299e314fb5d77b10fb53bbf9f3db6f612b344b0b3841

Contents?: true

Size: 853 Bytes

Versions: 6

Compression:

Stored size: 853 Bytes

Contents

require 'ember/handlebars/template'
require 'active_model_serializers'
require 'sprockets/railtie'

module Ember
  module Rails
    class Engine < ::Rails::Engine
      config.handlebars = ActiveSupport::OrderedOptions.new

      config.handlebars.precompile = true
      config.handlebars.templates_root = "templates"
      config.handlebars.templates_path_separator = '/'
      config.handlebars.output_type = :global
      config.handlebars.ember_template = Ember::VERSION =~ /\A1.[0-9]\./ ? 'Handlebars' : 'HTMLBars'

      config.before_initialize do |app|
        Sprockets::Engines #force autoloading
        Sprockets.register_engine '.handlebars', Ember::Handlebars::Template
        Sprockets.register_engine '.hbs', Ember::Handlebars::Template
        Sprockets.register_engine '.hjs', Ember::Handlebars::Template
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ember-rails-0.17.0 lib/ember/rails/engine.rb
ember-rails-0.16.4 lib/ember/rails/engine.rb
ember-rails-0.16.3 lib/ember/rails/engine.rb
ember-rails-0.16.2 lib/ember/rails/engine.rb
ember-rails-0.16.1 lib/ember/rails/engine.rb
ember-rails-0.16.0 lib/ember/rails/engine.rb