Skip to content

Instantly share code, notes, and snippets.

@HotFusionMan
Created October 16, 2013 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HotFusionMan/7002217 to your computer and use it in GitHub Desktop.
Save HotFusionMan/7002217 to your computer and use it in GitHub Desktop.
How to render Haml to HTML in the Rails console.
include ActionView::Helpers
haml_code = File.open( 'path/to/haml/file' ) { |file| file.read }
engine = Haml::Engine.new( haml_code )
puts engine.render
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment