Easy to use coffee-haml-filter in Rails. In the Rails 2 section, run
script/plugin install git://github.com/gerad/coffee-haml-filter.git
In the Rails 3 section you can add a line
gem 'coffee-haml-filter', :git => 'git://github.com/gerad/coffee-haml-filter.git'
into your Gemfile and run bundle install . (It's all assumed that you want to use the gerad plug, which is more modern than the inem original version , starting with this entry.).
In any other Ruby application, this is a little more complicated, but still quite easy to do it (for example, using Gemfile and Bundler.require ), or, more simply, by loading the coffee.rb file directly from gerad repo, pasting it into the folder and require -ing).
But what if I just use haml on the command line, for example? Is there a way to set a custom filter so that Haml uses it in a system-wide? Or could I possibly use the require statement from the Haml template to get the filter you need?
source share