user_info.rb 165 B

123456789
  1. module UserInfo
  2. def self.current_user_id
  3. Thread.current[:user_id]
  4. end
  5. def self.current_user_id=(user_id)
  6. Thread.current[:user_id] = user_id
  7. end
  8. end