activerecord_partitioning 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/activerecord_partitioning.rb +3 -2
- metadata +3 -3
@@ -16,9 +16,10 @@ module ActiveRecordPartitioning
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def with_connection_pool(config, &block)
|
19
|
-
|
19
|
+
config.try(:symbolize_keys!)
|
20
|
+
self.current_connection_pool_config = (self.default_config || {}).merge(config || {})
|
20
21
|
if ActiveRecord::Base.connection_pool.nil?
|
21
|
-
ActiveRecord::Base.establish_connection(
|
22
|
+
ActiveRecord::Base.establish_connection(self.current_connection_pool_config)
|
22
23
|
end
|
23
24
|
yield if block_given?
|
24
25
|
ensure
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord_partitioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Xiao Li
|