File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 1
1
require 'postgresql_cursor/version'
2
- require 'postgresql_cursor/cursor'
3
- require 'postgresql_cursor/active_record/relation/cursor_iterators'
4
- require 'postgresql_cursor/active_record/sql_cursor'
5
- require 'postgresql_cursor/active_record/connection_adapters/postgresql_type_map'
6
2
7
- # ActiveRecord 4.x
8
- require 'active_record'
9
- require 'active_record/connection_adapters/postgresql_adapter'
10
- ActiveRecord ::Base . extend ( PostgreSQLCursor ::ActiveRecord ::SqlCursor )
11
- ActiveRecord ::Relation . send ( :include , PostgreSQLCursor ::ActiveRecord ::Relation ::CursorIterators )
12
- ActiveRecord ::ConnectionAdapters ::PostgreSQLAdapter . send ( :include , PostgreSQLCursor ::ActiveRecord ::ConnectionAdapters ::PostgreSQLTypeMap )
3
+ ActiveSupport . on_load :active_record do
4
+ require 'postgresql_cursor/cursor'
5
+ require 'postgresql_cursor/active_record/relation/cursor_iterators'
6
+ require 'postgresql_cursor/active_record/sql_cursor'
7
+ require 'postgresql_cursor/active_record/connection_adapters/postgresql_type_map'
8
+
9
+ # ActiveRecord 4.x
10
+ require 'active_record/connection_adapters/postgresql_adapter'
11
+ ActiveRecord ::Base . extend ( PostgreSQLCursor ::ActiveRecord ::SqlCursor )
12
+ ActiveRecord ::Relation . send ( :include , PostgreSQLCursor ::ActiveRecord ::Relation ::CursorIterators )
13
+ ActiveRecord ::ConnectionAdapters ::PostgreSQLAdapter . send ( :include , PostgreSQLCursor ::ActiveRecord ::ConnectionAdapters ::PostgreSQLTypeMap )
14
+ end
You can’t perform that action at this time.
0 commit comments