Skip to content

Instantly share code, notes, and snippets.

@vincentwoo
Created November 22, 2012 10:00
Show Gist options
  • Save vincentwoo/4130326 to your computer and use it in GitHub Desktop.
Save vincentwoo/4130326 to your computer and use it in GitHub Desktop.
# configure cache digests plugin to recognize calls to "partial" helper
regexp_source = CacheDigests::TemplateDigestor::RENDER_DEPENDENCY.to_s
# replace 'render' with a noncapturing group to preserve gem functionality
regexp_source.sub! 'render', '(?:render|partial)'
CacheDigests::TemplateDigestor.instance_eval {remove_const :RENDER_DEPENDENCY}
CacheDigests::TemplateDigestor::RENDER_DEPENDENCY = Regexp.new regexp_source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment