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.
- data/lib/app/controllers/anytime_controller.rb +11 -3
- metadata +1 -1
@@ -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
|
-
|
12
|
-
if defined?(
|
13
|
-
|
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
|
|