Skip to content

Instantly share code, notes, and snippets.

@talbright
Created November 14, 2014 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talbright/f4e3c9ed18e92c97928d to your computer and use it in GitHub Desktop.
Save talbright/f4e3c9ed18e92c97928d to your computer and use it in GitHub Desktop.
Rails: instrument output of fragment caching for debugging
# config/initializers
ActiveSupport::Notifications.subscribe /fragment.action_controller/ do |*args|
event = ActiveSupport::Notifications::Event.new *args
Rails.logger.info "Notification for event #{event.name} with payload #{event.payload}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment