-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.rb
More file actions
25 lines (22 loc) · 664 Bytes
/
Copy pathinit.rb
File metadata and controls
25 lines (22 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# = DatabaseCounters
#
# Adds two database counters to the log for a request:
#
# - total number of requests that were made
# - total number of rows that were returned
#
#
# Author:: mike demers <mike_[AT]_9astronauts.com>
# Homepage:: <http://9astronauts.com/code/database_counters>
# Copyright:: Copyright (c) 2007-8 Nine Astronauts
# License:: Distributed under the same terms as Ruby
#
#
require 'nine_astronauts/database_counters'
ActionController::Base.class_eval do
include NineAstronauts::DatabaseCounters::ControllerMixin
end
ActiveRecord::Base.connection.class.class_eval do
include NineAstronauts::DatabaseCounters::ConnectionMixin
end