Module: Sparkle::Helper
- Defined in:
- lib/sparkle/helper.rb
Instance Method Summary collapse
Instance Method Details
#render_sparkle(options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/sparkle/helper.rb', line 4 def render_sparkle key = rand(2**128).to_s(36) Rails.cache.write(key, ) if [:locals].values.any? { |value| value._sparkle_cached_ if value.class.include?(Refreshable) } [:locals][:sparkle_cache_key] = key else [:locals][:sparkle_cache_key] = nil end render end |