Skip to content

Instantly share code, notes, and snippets.

@neocsr
Created February 1, 2011 02:20
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 neocsr/805293 to your computer and use it in GitHub Desktop.
Save neocsr/805293 to your computer and use it in GitHub Desktop.
Add haml support to Textmate bundle in Rails 3
# =================================================
# = Texmate support for Rails 3 bundle navigation =
# =================================================
# ~/Library/Application Support/TextMate/Pristine Copy/Bundles/Ruby on Rails.tmbundle/Support/lib/rails/rails_path.rb
# or
# ~/Library/Application\ Support/TextMate/Bundles/Ruby\ on\ Rails.tmbundle/Support/lib/rails/rails_path.rb
# line 293
def wants_haml
@wants_html ||= File.file?(File.join(rails_root, "vendor/plugins/haml/", "init.rb")) ||
File.read(File.join(rails_root, 'config', 'environment.rb')) =~ /haml/ ||
File.read(File.join(rails_root, 'Gemfile')) =~ /haml/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment