Created
May 4, 2013 23:18
-
-
Save schmidp/5519119 to your computer and use it in GitHub Desktop.
Rails 4.0 ember-rails engine.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ember/handlebars/template' | |
require 'active_model_serializers' | |
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.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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment