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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1aa60b9ed13c4fcec274ab0ba54ae740c8c6761
4
- data.tar.gz: 27d6f63c609c7da615408b3d6fecacdc81011f39
3
+ metadata.gz: cc45b5ecf78ce0277a3207de0b9a6bc52bd45dac
4
+ data.tar.gz: 516bb8973e970917a478a0f452e5326cc8a53fd6
5
5
  SHA512:
6
- metadata.gz: 99ad9501c2e3ae9f11633b3a5eae1eb2e69ce7367fdb129aeb3d91ec9612071063ffc4f7f00e50def88baa114dfccc1f5057336f0dd6e2a198713ea84fbb6bfd
7
- data.tar.gz: 6d880ec17fe0b46e38cc97556b531f80fe73a7a526a44c3d653735e584d162060a5b51527a1ad6046fcedd9661586ef4e70e1d854bfd2828ecd4663f462895a3
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?(:class_name)
53
- model_name = receiver.send(models).class_name
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).class.class_name
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
@@ -1,3 +1,3 @@
1
1
  module ActiveArchiver
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord