tramway-user 2.1.2.1 → 2.1.3

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
  SHA256:
3
- metadata.gz: 65dcd579b3667528952d39244f05286c10d1ba15d7507dd0d4d0f22668b05b87
4
- data.tar.gz: d7d91db795dbb6fb59279f061b773b13d4acfaef203a57a5011948a2f5366c76
3
+ metadata.gz: 9c93a4759c90b60858ccb08d74a67a255627d082b918c5bd2a0c820330559109
4
+ data.tar.gz: 1a955a0de07469bb8fe519e5f0c89bc2340f3998f789f0e63fc66f236d3da3c4
5
5
  SHA512:
6
- metadata.gz: 9da675f04b2fff2caf9abfc760dc7d1da6b31cdf79b47a0a63f51ed5ba12b1eea2b895cd2705ed6ddb83473dfb93704c7f6accc7ea37f90eafc272b4b8d7418c
7
- data.tar.gz: 90c37693bd15facba4ceebe8ccb6ab330398ac0d2cfc5c7eea9cddd74fc0c7502f5bbdc5350c0c42e7a29d8a25e006c0c45f4b3d227be2ba51c2d885f84b622a
6
+ metadata.gz: 1f34a1205dc744cc9a52b9ff0f70c2cffb1ba0d61d7b83c59258e408729f35b00b907bebd566b1d8680cc9dea05d81bad6ea29c21a00896bb3462c74fc7bde94
7
+ data.tar.gz: 1f577c0f97c2930fd46df20065dcc88f01e6d2add0523313905312019adfaaff37eada73e6cbd56327e262216f6f7bcff8398a91caa26642a959a21704b3d15e
@@ -13,8 +13,16 @@ class Tramway::User::UserDecorator < ::Tramway::Core::ApplicationDecorator
13
13
  def show_attributes
14
14
  %i[email first_name last_name phone role created_at updated_at]
15
15
  end
16
+
17
+ if defined? Tramway::Conference
18
+ def show_associations
19
+ [ :social_networks ]
20
+ end
21
+ end
16
22
  end
17
23
 
24
+ decorate_association :social_networks, as: :record if defined? Tramway::Conference
25
+
18
26
  delegate_attributes :first_name, :last_name, :email, :phone, :role, :created_at, :updated_at
19
27
 
20
28
  def name
@@ -2,6 +2,8 @@
2
2
 
3
3
  class Tramway::User::User < ::Tramway::Core::ApplicationRecord
4
4
  has_secure_password
5
+
6
+ has_many :social_networks, as: :record, class_name: 'Tramway::Profiles::SocialNetwork' if defined? Tramway::Conference
5
7
 
6
8
  # FIXME: replace to tramway-admin
7
9
  enumerize :role, in: %i[user admin], default: :admin
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module User
5
- VERSION = '2.1.2.1'
5
+ VERSION = '2.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-user
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2.1
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt