9 lines
160 B
Ruby
9 lines
160 B
Ruby
|
module UserInfo
|
||
|
def current_user_id
|
||
|
Thread.current[:user_id]
|
||
|
end
|
||
|
|
||
|
def self.current_user_id=(user_id)
|
||
|
Thread.current[:user_id] = user_id
|
||
|
end
|
||
|
end
|