Permalink
Browse files

Show a warning if no variant is set in environment

  • Loading branch information...
1 parent 82d35eb commit b8ac8c748ba10337902c5260becc96e0c182f9e5 @tchak tchak committed Jun 11, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/ember/rails/engine.rb
  2. +1 −1 test/dummy/config/application.rb
View
5 lib/ember/rails/engine.rb
@@ -20,6 +20,11 @@ class Engine < ::Rails::Engine
# Add the gem's vendored ember to the end of the asset search path
variant = app.config.ember.variant
+
+ if variant.nil?
+ warn "[EMBER-RAILS] `ember.variant` was not found in your current environment"
+ end
+
ember_path = File.expand_path("../../../../vendor/ember/#{variant}", __FILE__)
app.config.assets.paths.unshift ember_path
end
View
2 test/dummy/config/application.rb
@@ -40,7 +40,7 @@ class Application < Rails::Application
# Enable the asset pipeline
config.assets.enabled = true
- config.handlebars.precompile = true
+ config.ember.variant = :production
end
end

0 comments on commit b8ac8c7

Please sign in to comment.