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
Written by yanhaoyang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#