demo_mode 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/demo_mode/demoable.rb +8 -1
- data/lib/demo_mode/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3032c631c3d2308b21588fe6d8598635c3a90e0be15edaae81fe9d869bd9b089
|
4
|
+
data.tar.gz: 8af75b0ceeb37fcdd98120980c3ab2ac14a18e6b503c04fbf8e3fd9eb6b47c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5352ef735cc354a3da6260c690a1862c4e24f1adca8e91b7a8ba13944e0a1000339d3f184a8ea12b97e6578f535a040c24b17254f0c8d3cfe9131182a8d1fa
|
7
|
+
data.tar.gz: 810e15296241a0913d4c2a194eeae7577c7c6cbad58f5bc28c188fff2279eefc134368aa17e2fe14813db925192c8e1f2f1ddd88ddc9044cee92136429d93345
|
@@ -12,7 +12,14 @@ module DemoMode
|
|
12
12
|
def current_demo_session
|
13
13
|
if session.key?(:demo_session)
|
14
14
|
@current_demo_session = nil if @current_demo_session&.id != session[:demo_session]['id']
|
15
|
-
@current_demo_session ||= Session.
|
15
|
+
@current_demo_session ||= Session.find_by(id: session[:demo_session]['id'])
|
16
|
+
|
17
|
+
if @current_demo_session.nil?
|
18
|
+
session.delete(:demo_session)
|
19
|
+
sign_out
|
20
|
+
end
|
21
|
+
|
22
|
+
@current_demo_session
|
16
23
|
end
|
17
24
|
end
|
18
25
|
|
data/lib/demo_mode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: demo_mode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cli-ui
|