pattana 0.1.15 → 0.1.16
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23f0498e9dae32310ed005c0d28049d0e4c08080
|
4
|
+
data.tar.gz: 35f26c8cb3b77755e39e9b1e88a9d27614749a07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef25b43c62b71683414e29898b6b26eaf046f40a04ed29880c6cc234dbba78038fee61835c8e9d729e592c9588ffa83866c0e57efdc47c5064645c729a8abb2c
|
7
|
+
data.tar.gz: 5189be80a84d2b997396fd7b028979de02703a5c768c2fe297120d764105d964884505f34ba7e0a0bb62e9fa527f79863026d9a70c70d93bddff5ea766a41f0b
|
@@ -3,6 +3,19 @@ class CityPreviewSerializer < ActiveModel::Serializer
|
|
3
3
|
|
4
4
|
attributes :id, :name, :priority, :operational
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
has_one :country, serializer: CountryPreviewSerializer do
|
7
|
+
if object.country
|
8
|
+
object.country
|
9
|
+
else
|
10
|
+
object.build_country
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
has_one :region, serializer: RegionPreviewSerializer do
|
15
|
+
if object.region
|
16
|
+
object.region
|
17
|
+
else
|
18
|
+
object.build_region
|
19
|
+
end
|
20
|
+
end
|
8
21
|
end
|
@@ -2,5 +2,11 @@ class RegionPreviewSerializer < ActiveModel::Serializer
|
|
2
2
|
include NullAttributeReplacer
|
3
3
|
attributes :id, :name, :priority, :operational
|
4
4
|
|
5
|
-
|
5
|
+
has_one :country, serializer: CountryPreviewSerializer do
|
6
|
+
if object.country
|
7
|
+
object.country
|
8
|
+
else
|
9
|
+
object.build_country
|
10
|
+
end
|
11
|
+
end
|
6
12
|
end
|
data/lib/pattana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pattana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: '0.1'
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.20
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0.1'
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
120
|
+
version: 0.1.20
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: bcrypt
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|