Sha256: a6b4ce4a9ef10403dba0aba01ed53177b7a9a579af734e357d625c730294b930
Contents?: true
Size: 340 Bytes
Versions: 4
Compression:
Stored size: 340 Bytes
Contents
module OpenConferenceWare module CacheIfHelper # Caches +block+ in view only if the +condition+ is true. # http://skionrails.wordpress.com/2008/05/22/conditional-fragment-caching/ def cache_if(condition, name={}, &block) if condition cache(name, &block) else block.call end end end end
Version data entries
4 entries across 4 versions & 1 rubygems