Last Updated: February 25, 2016
·
330
· yanhaoyang

Get template digest in Rails controllers

def template_digest    
  tmpl = lookup_context.find(action_name, _prefixes)
  ActionView::Digestor.digest(name: tmpl.virtual_path, finder: lookup_context)
end