usman 0.3.31 → 0.3.32

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4bfa2386a2c298ad494119700262a59a726b30c
4
- data.tar.gz: 5011650c91f8b6b7600e1e2494897ced93f95d71
3
+ metadata.gz: ca20e05a519e767c0db18f19dadef081761490d7
4
+ data.tar.gz: 0e28508b1179eb722c8da6f5eab50733d46d31c9
5
5
  SHA512:
6
- metadata.gz: 9b302ac4f88d06ad59feb0fdd97530ef6637e0d04e1a0a66c37555e9863101627a0333e591ac298edb7efe10dab64ea14f8fb90d20bf4ebcf857ae81a26bc255
7
- data.tar.gz: d73b401cee55ca12f7ef6afd93d6d1b44500138c2011f28cbdabfe705e2ea28e862589a5a9ea81a55998774134b3297e67a95dbd373b2359b09055f50869db57
6
+ metadata.gz: 2b22f0feccb081c67341a11aff0f167d3f2411f471db06f49adb10687b70b2f99c8436081476a197007068396c893a5111a58a569e6ff2f7fbadea0e0aab76ba
7
+ data.tar.gz: d8cd20f23c26ecdcf59a6cb9149c5a483861fa5077bb8acc3a3ff1530d719f08c29102578ddd8e8a490e8956090cc88613988a14aaf83fb01822c421042e12e5
@@ -9,4 +9,20 @@ class ProfileSerializer < ActiveModel::Serializer
9
9
  object.build_profile_picture
10
10
  end
11
11
  end
12
+
13
+ has_one :country, class_name: "Country", serializer: CountryPreviewSerializer do
14
+ if object.country
15
+ object.country
16
+ else
17
+ object.build_country
18
+ end
19
+ end
20
+
21
+ has_one :city, class_name: "City", serializer: CityPreviewSerializer do
22
+ if object.city
23
+ object.city
24
+ else
25
+ object.build_city
26
+ end
27
+ end
12
28
  end
data/lib/usman/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Usman
2
- VERSION = '0.3.31'
2
+ VERSION = '0.3.32'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.31
4
+ version: 0.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma