Permalink
Browse files

update the sprockets handlebars template handler to use Ember and not SC

  • Loading branch information...
1 parent 1133636 commit 3e024dcf37e65ebd2ea446dc0a2fb9b133813a5e @joshk joshk committed Jan 2, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 bin/jasmine
  2. +2 −2 config/initializers/sprockets.rb
  3. +2 −2 lib/sprockets/{sc_handlebars.rb → ember_handlebars.rb}
View
@@ -6,7 +6,7 @@ require 'rubygems'
require 'yaml'
require 'fileutils'
require 'sprockets'
-require 'sprockets/sc_handlebars'
+require 'sprockets/ember_handlebars'
sprockets = Sprockets::Environment.new
sprockets.cache = Sprockets::Cache::FileStore.new('tmp/cache')
@@ -1,3 +1,3 @@
-require 'sprockets/sc_handlebars'
+require 'sprockets/ember_handlebars'
-Rails.application.assets.register_engine 'hjs', ScHandlebars
+Rails.application.assets.register_engine 'hjs', EmberHandlebars
@@ -1,7 +1,7 @@
require 'tilt'
require 'json'
-class ScHandlebars < Tilt::Template
+class EmberHandlebars < Tilt::Template
def self.default_mime_type
"application/javascript"
end
@@ -10,6 +10,6 @@ def prepare
end
def evaluate(scope, locals, &block)
- "SC.TEMPLATES['#{scope.logical_path}'] = SC.Handlebars.compile(#{data.to_json})"
+ "Ember.TEMPLATES['#{scope.logical_path}'] = Ember.Handlebars.compile(#{data.to_json})"
end
end

0 comments on commit 3e024dc

Please sign in to comment.