defcon 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 20bc5842476a4eb7364aed19bfe432bfd889455b
4
- data.tar.gz: c929ad5de421b8f9e03417aefc9ebb554b982bb4
3
+ metadata.gz: 161fb69475843f33f98d875a7b3411f6da2b9488
4
+ data.tar.gz: 17b25ebff6f55cb867259e9ff283caa084ea08b8
5
5
  SHA512:
6
- metadata.gz: 579bf1bb18acc501f4bbccd0b7bd6280f0fc35618435222e005003c9ee84b4661077637d121bfeebac782f6e42c999e3157048c30858b2bdf8d21c5474a8cc32
7
- data.tar.gz: 37b7174e4e21af37756a12bea39327822b55ff58f08d2ddfa6b3dd87b1c954ae9aec51ea46eae35cfbe2a9ae32116033a555960207de0a819c6f295256c4e31a
6
+ metadata.gz: 9f197dee0330dad4495537055adb8c4295bb73c2791828b10d01c4bc08165bf42f2d50d937eb13a665faf2071e63a1cafd86a1823eac8265f28c416cb2518523
7
+ data.tar.gz: 1f2f4eb8dbfdf32899d54b154e99b7ca5a3fa3b34648afec4db907e84e72f8feb047419cd312d2e5d5ab0a5a41bd4ed3485eb28241bbb8b472a0969581599686
@@ -15,7 +15,8 @@ module Defcon
15
15
  admin.save
16
16
  session[:admin_id] = admin.id
17
17
  session[:admin_username] = admin.username
18
- redirect_to admin_root_path, notice: "Welcome back!"
18
+ flash[:notice] = "Welcome back!"
19
+ redirect_to defcon_welcome_path
19
20
  else
20
21
  if !admin.nil?
21
22
  admin.attempts = admin.attempts + 1
@@ -25,21 +26,24 @@ module Defcon
25
26
  if !admin.nil? && admin.locked_out?
26
27
  message = "Locked out!"
27
28
  end
28
- redirect_to defcon_login_path, alert: message
29
+ flash[:alert] = message
30
+ redirect_to defcon_login_path
29
31
  end
30
32
  end
31
33
 
32
34
  def destroy
33
35
  session[:admin_id] = nil
34
36
  session[:admin_username] = nil
35
- redirect_to defcon_login_path, notice: "Until next time!"
37
+ flash[:notice] = "Until next time!"
38
+ redirect_to defcon_login_path
36
39
  end
37
40
 
38
41
  private
39
42
 
40
43
  def logged_in_check
41
44
  if !logged_in?
42
- redirect_to defcon_login_path, alert: "You are not logged in."
45
+ flash[:alert] = "You are not logged in."
46
+ redirect_to defcon_login_path
43
47
  return false
44
48
  else
45
49
  return true
@@ -48,7 +52,8 @@ module Defcon
48
52
 
49
53
  def logged_out_check
50
54
  if logged_in?
51
- redirect_to admin_root_path, alert: "You are already logged in."
55
+ flash[:alert] = "You are already logged in."
56
+ redirect_to defcon_welcome_path
52
57
  return false
53
58
  else
54
59
  return true
@@ -1,3 +1,3 @@
1
1
  module Defcon
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defcon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cleophus Robinson