sessions: store geolocated country in CurrentUser.

This commit is contained in:
evazion
2020-12-31 01:43:29 -06:00
parent 4b171bf97e
commit 9e9ac8f4bf
3 changed files with 16 additions and 1 deletions

View File

@@ -40,6 +40,14 @@ class CurrentUser
RequestStore[:current_ip_addr] = ip_addr
end
def self.country
RequestStore[:country]
end
def self.country=(country)
RequestStore[:country] = country
end
def self.root_url
RequestStore[:current_root_url] || "https://#{Danbooru.config.hostname}"
end