Last active
December 26, 2015 07:19
-
-
Save rpocklin/7114606 to your computer and use it in GitHub Desktop.
Get emblem-rails working on any Rails 3.1+ app without ember.js
handlebars.js is required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add gem 'emblem-rails' to your Rails Gemfile and run 'bundle' | |
// create your template file in your Rails project | |
/app/assets/javascripts/templates/test.raw.emblem eg. 'h1 {{title}} world' | |
// add the following to your Rails application.js | |
Ember = {TEMPLATES: [], Handlebars: Handlebars} | |
//= require_tree ./templates | |
// anywhere later in your code - call it as a compiled template: | |
$('body').html(Ember.TEMPLATES['test']({title: 'hello'})); | |
// beer ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment