Guest User

Untitled

a guest
Jul 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # handles cached actions and fragments with easy
  2.  
  3. def write_fragment(key, content, options = nil)
  4. if options[:tag]
  5. tags = options[:tag].is_a?(Array) ? options[:tag] : [options[:tag]]
  6. tags.each do |tag|
  7. some_redis.sadd tag, fragment_cache_key(key)
  8. end
  9. end
  10. super
  11. end
Add Comment
Please, Sign In to add comment