Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

switch from ember development to production based on rails environment

  • Loading branch information...
commit 167de1fa68c9700d27bd4670183e6a7f83a2cc1e 1 parent 44eedab
@tchak tchak authored
View
2  lib/ember/handlebars/source.rb
@@ -12,7 +12,7 @@ def vendor_path
path = ::Rails.root.nil? ? '' : ::Rails.root.join('vendor/assets/javascripts/ember.js')
if !File.exists?(path)
- path = File.expand_path(File.join(__FILE__, '../../../../vendor/assets/javascripts/ember.js'))
+ path = File.expand_path(File.join(__FILE__, '../../../../vendor/assets/javascripts/production/ember.js'))
end
end
View
8 lib/ember/rails/engine.rb
@@ -12,6 +12,14 @@ class Engine < ::Rails::Engine
app.assets.register_engine '.handlebars', Ember::Handlebars::Template
app.assets.register_engine '.hbs', Ember::Handlebars::Template
app.assets.register_engine '.hjs', Ember::Handlebars::Template
+
+ assets_path = File.expand_path(File.join(__FILE__, '../../../../vendor/assets/javascripts'))
+
+ if ::Rails.env.production?
+ app.assets.append_path File.join(assets_path, 'production')
+ else
+ app.assets.append_path File.join(assets_path, 'development')
+ end
end
end
end
View
0  vendor/assets/javascripts/ember-runtime-dev.js → ...r/assets/javascripts/development/ember-runtime.js
File renamed without changes
View
0  vendor/assets/javascripts/ember-dev.js → vendor/assets/javascripts/development/ember.js
File renamed without changes
View
0  vendor/assets/javascripts/ember-runtime.js → ...or/assets/javascripts/production/ember-runtime.js
File renamed without changes
View
0  vendor/assets/javascripts/ember.js → vendor/assets/javascripts/production/ember.js
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.