tramway-user 2.1.3.2 → 2.1.3.3

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
  SHA256:
3
- metadata.gz: 7e851bd295fc9e5b424e7fed3f268bf596f501fcf384f128cd75c3970e6ed007
4
- data.tar.gz: 3f6c194a8612bd6f9dd60a9dfa829ba246efcab9726cc21c320883d8ed0ffb7a
3
+ metadata.gz: 48763df0538d0bf92c0538e45efd0df70ff017b050d9ed26d25525ccd64d77c0
4
+ data.tar.gz: 4c3d2c389e2dbeeb35e58bb5bcdaf4d4cb6f333f18f460124d9c03a3f7887230
5
5
  SHA512:
6
- metadata.gz: eee709ebed4e014d70b51aa7109300749546e0ee2e682aa4b73aafc96b30cf29b2803c75c5fa81d7560d350b28fd83bfcbf087cabfd850d66eb34064becaa670
7
- data.tar.gz: 10a39f9802133bf9786518bb4749afcdfd70bded4264cdba20f1c41b33d928cd68c66031997e0bc89d701f14276a6e1e3f8e806a94e10f19266a5e22335f142a
6
+ metadata.gz: e6f5408f00e456b0d3c06faa5b897d294c68eef5d76a15fec690512153732dd839c30e03e5d152d0144ca49d883e7aa911b1baed23bd07bed25791567e62f80b
7
+ data.tar.gz: 571f6c1500d1a6857edde7048af7c5da7da1f4863dfd7b351f12ab2ef5401dd4914ef29e8228c9639bba5b7caed34b36847631f922b7540178b93332598b2bb6
@@ -1,12 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Admin::Tramway::User::UserForm < ::Tramway::Core::ApplicationForm
4
- self.model_class = Tramway::User::User
4
+ self.model_class = Tramway::User::User.is_active
5
5
 
6
6
  properties :email, :password, :first_name, :last_name, :role, :phone
7
7
 
8
- validates :email, email: true
9
- validates :email, uniqueness: true, if: 'active?'
8
+ #fix me
9
+ unless self.model_class.columns_hash['project_id'].present?
10
+ validates :email, email: true, uniqueness: true, on: :destroy
11
+ end
10
12
 
11
13
  def initialize(object)
12
14
  super(object).tap do
@@ -14,4 +14,5 @@ class Tramway::User::User < ::Tramway::Core::ApplicationRecord
14
14
 
15
15
  scope :admins, -> { where role: :admin }
16
16
  scope :simple_users, -> { where role: :user }
17
+ scope :is_active, -> { where state: :active }
17
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module User
5
- VERSION = '2.1.3.2'
5
+ VERSION = '2.1.3.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.3.2
4
+ version: 2.1.3.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-08-04 00:00:00.000000000 Z
11
+ date: 2020-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt