toughguy 0.2.8 → 0.2.9
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/toughguy/model.rb +5 -2
- data/lib/toughguy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f7ad533d184cf0ee760d74f327c2b525f49a867
|
|
4
|
+
data.tar.gz: 8abc273c731560967c174fba47213223a4144aef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e6a0a11a74e266c5d3edd012da73b82180efcc0e28b401b16006c6d6fa5eb8db6cda0bf2e21d10cd62262f59bce8fd0b1b2d453b49f39e776fab1b466c8d7d2
|
|
7
|
+
data.tar.gz: fce220d63891f62e72c6441304711408e77779ab4047de1a198b9d7dce811629ad2cedfdae13a045ee1532757eaeb2b2c5eb67d3392d2c4098c995670cd14c00
|
data/Gemfile.lock
CHANGED
data/lib/toughguy/model.rb
CHANGED
|
@@ -282,10 +282,13 @@ module ToughGuy
|
|
|
282
282
|
def database=(db)
|
|
283
283
|
db = connection[db] if db.is_a?(String)
|
|
284
284
|
@database = db
|
|
285
|
+
@connection = db.connection if db
|
|
285
286
|
# update also for specialized model classes
|
|
286
287
|
if self == ToughGuy::Model
|
|
287
|
-
ToughGuy::MappedModel.database =
|
|
288
|
-
ToughGuy::
|
|
288
|
+
ToughGuy::MappedModel.database = @database
|
|
289
|
+
ToughGuy::MappedModel.connection = @connection
|
|
290
|
+
ToughGuy::SingletonModel.database = @database
|
|
291
|
+
ToughGuy::SingletonModel.connection = @connection
|
|
289
292
|
end
|
|
290
293
|
end
|
|
291
294
|
|
data/lib/toughguy/version.rb
CHANGED