Class: BackboneHandlebars::Template
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- BackboneHandlebars::Template
- Defined in:
- lib/backbone_handlebars/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_mime_type ⇒ Object
12 13 14 |
# File 'lib/backbone_handlebars/template.rb', line 12 def self.default_mime_type 'application/javascript' end |
.handlebars ⇒ Object
8 9 10 |
# File 'lib/backbone_handlebars/template.rb', line 8 def self. @@handlebars ||= File.new(::Rails.configuration..path).read end |
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/backbone_handlebars/template.rb', line 18 def evaluate(scope, locals, &block) path = scope.logical_path.gsub(/^templates\//i, '') if ::Rails.configuration..precompile == true template = (path, data) else template = (path, data) end end |
#prepare ⇒ Object
16 |
# File 'lib/backbone_handlebars/template.rb', line 16 def prepare; end |