Skip to content
This repository
Browse code

Show a warning if no variant is set in environment

  • Loading branch information...
commit b8ac8c748ba10337902c5260becc96e0c182f9e5 1 parent 82d35eb
Paul Chavard tchak authored
5 lib/ember/rails/engine.rb
@@ -20,6 +20,11 @@ class Engine < ::Rails::Engine
20 20
21 21 # Add the gem's vendored ember to the end of the asset search path
22 22 variant = app.config.ember.variant
  23 +
  24 + if variant.nil?
  25 + warn "[EMBER-RAILS] `ember.variant` was not found in your current environment"
  26 + end
  27 +
23 28 ember_path = File.expand_path("../../../../vendor/ember/#{variant}", __FILE__)
24 29 app.config.assets.paths.unshift ember_path
25 30 end
2  test/dummy/config/application.rb
@@ -40,7 +40,7 @@ class Application < Rails::Application
40 40 # Enable the asset pipeline
41 41 config.assets.enabled = true
42 42
43   - config.handlebars.precompile = true
  43 + config.ember.variant = :production
44 44 end
45 45 end
46 46

0 comments on commit b8ac8c7

Please sign in to comment.
Something went wrong with that request. Please try again.