mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 19:36:22 +00:00
21 lines
426 B
Ruby
21 lines
426 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Metadata
|
||
|
# Mixin para nunca generar atributos indexables
|
||
|
module NonIndexableConcern
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
included do
|
||
|
# Nunca
|
||
|
def indexable?
|
||
|
false
|
||
|
end
|
||
|
|
||
|
# Lanzar un error para poder enterarnos de la inconsistencia
|
||
|
def indexable_values
|
||
|
raise NotImplementedError, 'Este atributo no es indexable'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|