active_archiver 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_archiver/active_record_ext.rb +3 -3
- data/lib/active_archiver/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc45b5ecf78ce0277a3207de0b9a6bc52bd45dac
|
4
|
+
data.tar.gz: 516bb8973e970917a478a0f452e5326cc8a53fd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd21cd6d5757797b62e4604867c6c2a7da764fea38e220fa0e9033e20083ce0d6320c86140ac2fb15f83fe2405e8e13f9dece2aa88733ba08527696fa0fdcc8a
|
7
|
+
data.tar.gz: 1967b274a4a163c723917946d3a37c092faa6019e6ed4cf62d7814026b0d932284b1aec9a5451e6ef5f4199ed4a020b4a46054fdddf6c936364643e0ef8507a3
|
@@ -49,13 +49,13 @@ module ActiveArchiver
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def set_data(hash, receiver, models)
|
52
|
-
if receiver.send(models).respond_to?(:
|
53
|
-
model_name = receiver.send(models).
|
52
|
+
if receiver.send(models).respond_to?(:size)
|
53
|
+
model_name = receiver.send(models).model_name.plural
|
54
54
|
receiver.send(models).all.each do |r|
|
55
55
|
hash[:associations] << data_struct(model_name, models, r.serializable_hash)
|
56
56
|
end
|
57
57
|
else
|
58
|
-
model_name = receiver.send(models).
|
58
|
+
model_name = receiver.send(models).model_name.singular
|
59
59
|
hash[:associations] << data_struct(model_name, models, receiver.send(models).serializable_hash)
|
60
60
|
end
|
61
61
|
hash
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_archiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zaru
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|