anytime 0.1.3 → 0.1.4

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.
@@ -4,14 +4,22 @@ class AnytimeController < ActionController::Base
4
4
 
5
5
  def freeze
6
6
  date = params[:date]
7
+
7
8
  if defined?(current_user) and current_user
8
9
  user = current_user
9
10
  sign_out user
10
11
  end
11
- Anytime.freeze_at(date[:year].to_i, date[:month].to_i, date[:day].to_i, date[:hour].to_i, date[:minute].to_i, date[:second].to_i)
12
- if defined?(user) and user
13
- sign_in user
12
+
13
+ if defined?(current_admin) and current_admin
14
+ admin = current_admin
15
+ sign_out admin
14
16
  end
17
+
18
+ Anytime.freeze_at(date[:year].to_i, date[:month].to_i, date[:day].to_i, date[:hour].to_i, date[:minute].to_i, date[:second].to_i)
19
+
20
+ sign_in user if defined?(user)
21
+ sign_in admin if defined?(admin)
22
+
15
23
  redirect_to :back
16
24
  end
17
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anytime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: