FEATURE: Hidden SiteSetting.keep_old_ip_address_count to track IP history.

This commit is contained in:
Guo Xiang Tan
2020-09-17 10:55:29 +08:00
parent c2a660ead3
commit b47b640598
5 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
class UserIpAddressHistory < ActiveRecord::Base
belongs_to :user
validates :user_id, presence: true
validates :ip_address, presence: true, uniqueness: { scope: :user_id }
end