cache_digests icon indicating copy to clipboard operation
cache_digests copied to clipboard

Mention using ERBTracker with HAML in README

Open nickurban opened this issue 12 years ago • 10 comments

My templates are all in HAML and it took me a while to figure out why my dependencies weren't being recognized and how to fix it.

I added an initializer, as suggested by @tim-vandecasteele in #45

Hopeful this will make it more clear to others.

nickurban avatar May 21 '13 21:05 nickurban

I made some assumptions about why this isn't automatically registered (i.e. that it's not officially supported). If I'm wrong about that, please correct me.

nickurban avatar May 21 '13 21:05 nickurban

Hey @tim-vandecasteele, I didn't add Slim because I haven't tested it myself.

Can you confirm that it works?

nickurban avatar May 22 '13 15:05 nickurban

Yes, I confirm it's working for me. Dependencies are properly calculated when checking with the rake task.

tim-vandecasteele avatar May 22 '13 19:05 tim-vandecasteele

+1 for this PR. We lost a few hours that would have been saved by this being called out in the README.

eprothro avatar Aug 05 '13 16:08 eprothro

In case anyone is looking for the code for Haml (and other templating languages) support for view template cache digesting in Rails 4, it's referenced in this haml-rails PR: https://github.com/indirect/haml-rails/issues/50

Not trying to troll this post, but I think many may end up here if they're looking for how to get haml digestion to work in Rails as the code was ported from this repo.

eprothro avatar Sep 23 '13 14:09 eprothro

+1 for this. Spent some time trying to configure cache_digests and didn't figure out what was up until I check the source.

austenito avatar Dec 17 '13 18:12 austenito

FYI, @austenito if you're using the latest haml-rails release, it includes the necessary code to ensure cache digesting works properly.

eprothro avatar Dec 17 '13 20:12 eprothro

@eprothro thanks I'll give that a shot!

austenito avatar Dec 18 '13 04:12 austenito

@austenito no problem! Please let us know over on haml-rails if you have issues.

eprothro avatar Dec 18 '13 04:12 eprothro

update: https://github.com/indirect/haml-rails/ will now automagically include the initializer code. so if you are using rails you can just put haml-rails in your gemfile and this is taken care of.

jjb avatar Jan 19 '15 03:01 jjb