This commit is contained in:
r888888888
2013-11-20 15:45:03 -08:00
parent ce55d57728
commit 231993b98e
11 changed files with 177 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ class CurrentUser
ensure
self.user = old_user
self.ip_addr = old_ip_addr
self.mobile_mode = false
end
end
@@ -30,6 +31,14 @@ class CurrentUser
Thread.current[:current_ip_addr]
end
def self.mobile_mode=(mode)
Thread.current[:mobile_mode] = mode
end
def self.mobile_mode?
Thread.current[:mobile_mode]
end
def self.id
if user.nil?
nil