Sha256: 887630ad47f15aeec7c9afa367c6f512367a8e187bf1dc680bb517442479bf40

Contents?: true

Size: 245 Bytes

Versions: 7

Compression:

Stored size: 245 Bytes

Contents

ActiveRecord::Base.connection.class.class_eval do

  def execute_with_query_diet(query, name = nil)
    QueryDiet::Logger.log(query) do
      execute_without_query_diet(query, name)
    end
  end

  alias_method_chain :execute, :query_diet

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
query_diet-0.3.1 lib/query_diet/active_record_ext.rb
query_diet-0.3.0 lib/query_diet/active_record_ext.rb
query_diet-0.2.3 lib/query_diet/active_record_ext.rb
query_diet-0.2.2 lib/query_diet/active_record_ext.rb
query_diet-0.2.1 lib/query_diet/active_record_ext.rb
query_diet-0.2.0 lib/query_diet/active_record_ext.rb
query_diet-0.1.0 lib/query_diet/active_record_ext.rb