mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 07:16:03 +01:00
10 lines
247 B
Ruby
10 lines
247 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AnonymousBlock < ApplicationRecord
|
|
belongs_to :user
|
|
belongs_to :question, optional: true
|
|
|
|
def self.get_identifier(ip)
|
|
Digest::SHA2.new(512).hexdigest(Rails.application.secret_key_base + ip)
|
|
end
|
|
end
|