Created
October 29, 2014 13:43
-
-
Save YanhaoYang/a07032ab0148ab813565 to your computer and use it in GitHub Desktop.
Get template digest in controllers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def template_digest | |
tmpl = lookup_context.find(action_name, _prefixes) | |
ActionView::Digestor.digest(name: tmpl.virtual_path, finder: lookup_context) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment