tramway-api 1.8.7.1 → 1.8.7.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ae1c864b0adbd268a320967b353e9e4dafd1229927a1446f7970712e09b7e14
|
|
4
|
+
data.tar.gz: 9a181d73ef86e3938e6a39116393c49ed32ffef83b23e65b54077e2112875171
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9bcef82854507a041424b52ea238316a4ee730b93f315de4f3e9581664af043713171a4ced01504bf3311ba854701711c3ecbb9884a5ec4806ce04b30f054180
|
|
7
|
+
data.tar.gz: f945e100c867be14f73423d23d40b0aaca80479ab7ea7e5170cb6494dcbafe63608bc7ebfda9310efcdeeaa798ff8cf1f3dbfad575482b9dab60fd7fa3bf3443
|
|
@@ -43,7 +43,7 @@ module Tramway
|
|
|
43
43
|
|
|
44
44
|
def find_user_by_auth_attributes
|
|
45
45
|
user_based_model = params[:user_based_model].constantize
|
|
46
|
-
Tramway::Api.auth_attributes[user_based_model].each do |attribute|
|
|
46
|
+
Tramway::Api.auth_attributes[params[:user_based_model]].each do |attribute|
|
|
47
47
|
object = user_based_model.active.where.not(attribute => nil).find_by(attribute => auth_params[:login])
|
|
48
48
|
return object if object
|
|
49
49
|
end
|
|
@@ -56,7 +56,7 @@ module Tramway
|
|
|
56
56
|
|
|
57
57
|
def current_user
|
|
58
58
|
Tramway::Api.user_based_models.map do |user_based_model|
|
|
59
|
-
send("current_#{user_based_model.name.underscore}") unless user_based_model == User
|
|
59
|
+
send("current_#{user_based_model.constantize.name.underscore}") unless user_based_model == User
|
|
60
60
|
end.compact.first
|
|
61
61
|
end
|
|
62
62
|
end
|
data/lib/tramway/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.7.
|
|
4
|
+
version: 1.8.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pavel Kalashnikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_model_serializers
|
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
117
|
version: '0'
|
|
118
118
|
requirements: []
|
|
119
|
-
rubygems_version: 3.1
|
|
119
|
+
rubygems_version: 3.0.3.1
|
|
120
120
|
signing_key:
|
|
121
121
|
specification_version: 4
|
|
122
122
|
summary: Engine for api
|