mongoid-rails2 1.9.3 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mongoid/config.rb +17 -0
- data/lib/mongoid/version.rb +1 -1
- metadata +3 -3
data/lib/mongoid/config.rb
CHANGED
@@ -121,6 +121,23 @@ module Mongoid #:nodoc
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
# Convenience method for connecting to the master database after forking a
|
125
|
+
# new process.
|
126
|
+
#
|
127
|
+
# Example:
|
128
|
+
#
|
129
|
+
# <tt>Mongoid.reconnect!</tt>
|
130
|
+
def reconnect!(now = true)
|
131
|
+
if now
|
132
|
+
master.connection.connect
|
133
|
+
else
|
134
|
+
# We set a @reconnect flag so that #master knows to reconnect the next
|
135
|
+
# time the connection is accessed.
|
136
|
+
@reconnect = true
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
|
124
141
|
# Reset the configuration options to the defaults.
|
125
142
|
#
|
126
143
|
# Example:
|
data/lib/mongoid/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-rails2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 1.9.
|
9
|
+
- 4
|
10
|
+
version: 1.9.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Durran Jordan
|