egov_utils 0.7.1 → 0.7.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77ce0843ebb4bc70b8389b530dd43dd45c232cea4c741ec014995c77cb259e61
|
4
|
+
data.tar.gz: 954dbe830452f604e681b87a6d33b8cefea419bcf141fbd5cebd088b3316e7c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7394626c5d9f1771c679de090479739c1d78f212d9cada20f4dafbc6eebfcbedc336348c7b2b34192f6ce6b20165136cbc9d3750090f5b06318001038d56675
|
7
|
+
data.tar.gz: 1f3f2e7c890eac9696bcf862d856758cee4280fe49e9ff5bc20d98af8884ee020d2ebff85e4fbe644f3050ddc0365ef1972d093a334f38d212ea331116028415
|
@@ -9,7 +9,7 @@ module EgovUtils
|
|
9
9
|
respond_to do |format|
|
10
10
|
if params['_type'] == 'query'
|
11
11
|
format.json{ render json: {
|
12
|
-
results: @people_schema.entities.collect do |p|
|
12
|
+
results: @people_schema.entities.includes(:residence).collect do |p|
|
13
13
|
{id: p.id, text: p.to_s, residence: p.residence.to_s}
|
14
14
|
end
|
15
15
|
}}
|
@@ -64,7 +64,7 @@ module EgovUtils
|
|
64
64
|
@user = User.find_by(id: params[:id])
|
65
65
|
render_404 and return if @user.nil? || @user.active?
|
66
66
|
authorize!(:manage, User)
|
67
|
-
@user.update(active: true)
|
67
|
+
@user.update(active: true, last_login_at: Time.current)
|
68
68
|
redirect_back(fallback_location: @user)
|
69
69
|
end
|
70
70
|
|
@@ -66,8 +66,8 @@ module EgovUtils
|
|
66
66
|
|
67
67
|
if user && !user.new_record?
|
68
68
|
# Check last login
|
69
|
-
if user.days_before_inactive && user.last_login_at < (Time.now - user.days_before_inactive.days)
|
70
|
-
user.update_column(active
|
69
|
+
if user.days_before_inactive && (user.last_login_at || user.created_at) < (Time.now - user.days_before_inactive.days)
|
70
|
+
user.update_column(:active, false)
|
71
71
|
end
|
72
72
|
|
73
73
|
user.update_column(:last_login_at, Time.now) if user.active?
|
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|