2022-06-14 08:09:10 -07:00
|
|
|
class AnonymousBlock < ApplicationRecord
|
|
|
|
belongs_to :user
|
|
|
|
belongs_to :question, optional: true
|
2022-06-14 13:51:31 -07:00
|
|
|
|
|
|
|
def self.get_identifier(ip)
|
|
|
|
Digest::SHA2.new(512).hexdigest(Rails.application.secret_key_base + ip)
|
|
|
|
end
|
2022-06-14 08:09:10 -07:00
|
|
|
end
|