lib/vizsla/patches.rb in vizsla-0.0.5 vs lib/vizsla/patches.rb in vizsla-0.0.6

- old
+ new

@@ -3,13 +3,11 @@ module Vizsla class Patches include ::Vizsla::Helpers class << self - def patch_postgres - if block_given? - @postgres_event_hanlder = Proc.new(&block) - end + def patch_postgres(&block) + @postgres_event_handler = block ::PG::Connection.class_eval do alias_method :exec_without_profiling, :exec def exec(*args, &blk)