databound 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/databound.rb +2 -2
- data/lib/databound/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: 653a550f083995f9202d5278761a1c5643ef020a
|
4
|
+
data.tar.gz: ee61013ee3932c2d17c5a284b2b46da85d328d6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb63b89624b40e18c0c8333e8a00c1e0c87a06e16a2751c64bf29072d69695c93a55894a3bd598a80959ebd16f23307b58d8ec8e68d0aae5a0495b862e3a46a
|
7
|
+
data.tar.gz: 1ca9b445e94d029740a0e79f9f7b1b51a32609ea92e7018c4414437fa087d8ba2599417eedc893590ed18e39908a34eb0bc944a8472c9e6a34a4215b3430ff4c
|
data/lib/databound.rb
CHANGED
@@ -47,7 +47,7 @@ module Databound
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def serialize_array(records)
|
50
|
-
return records unless defined?(ActiveModel::Serializer)
|
50
|
+
return records.to_json unless defined?(ActiveModel::Serializer)
|
51
51
|
|
52
52
|
serializer = ActiveModel::Serializer.serializer_for(records.first)
|
53
53
|
return records unless serializer
|
@@ -57,7 +57,7 @@ module Databound
|
|
57
57
|
|
58
58
|
def serialize(record, attribute)
|
59
59
|
unserialized = record.send(attribute)
|
60
|
-
return unserialized unless defined?(ActiveModel::Serializer)
|
60
|
+
return unserialized.to_json unless defined?(ActiveModel::Serializer)
|
61
61
|
|
62
62
|
serializer = ActiveModel::Serializer.serializer_for(record)
|
63
63
|
return unserialized unless serializer
|
data/lib/databound/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: databound
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domas Bitvinskas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|