mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 19:16:23 +00:00
26 lines
451 B
Ruby
26 lines
451 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Metadata
|
||
|
# Mixin para campos que no se pueden cifrar
|
||
|
module AlwaysPublicConcern
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
included do
|
||
|
# Siempre son públicos
|
||
|
#
|
||
|
# @return [Boolean]
|
||
|
def private?
|
||
|
false
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def decrypt(value)
|
||
|
raise NotImplementedError, 'Este atributo no se cifra'
|
||
|
end
|
||
|
|
||
|
alias_method :encrypt, :decrypt
|
||
|
end
|
||
|
end
|
||
|
end
|