Sha256: fa0c2104fb816d2598843d7687e6563aed627fa26ca29d3475338c2d08dd7a38

Contents?: true

Size: 762 Bytes

Versions: 6

Compression:

Stored size: 762 Bytes

Contents

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

module Ember
  module Rails
    class Engine < ::Rails::Engine
      Ember::Handlebars::Template.configure do |handlebars_config|
        config.handlebars = handlebars_config

        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'
      end

      config.before_initialize do |app|
        Sprockets::Engines #force autoloading

        Ember::Handlebars::Template.setup Sprockets
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
discourse-ember-rails-0.18.6 lib/ember/rails/engine.rb
ember-rails-0.19.3 lib/ember/rails/engine.rb
ember-rails-0.18.5 lib/ember/rails/engine.rb
ember-rails-0.19.2 lib/ember/rails/engine.rb
ember-rails-0.18.4 lib/ember/rails/engine.rb
ember-rails-0.19.1 lib/ember/rails/engine.rb