Sha256: bf0cbb804631079490d160ac3f4a04fddd498ba47d599fad856509fa5afeea60
Contents?: true
Size: 427 Bytes
Versions: 44
Compression:
Stored size: 427 Bytes
Contents
module Kuhsaft class BrickTypeFilter < SimpleDelegator def empty? !(respond_to?(:user_can_add_childs?) && user_can_add_childs? && !allowed.empty?) end def allowed if Kuhsaft::BrickType.enabled.count.zero? [] elsif allowed_brick_types.empty? Kuhsaft::BrickType.enabled else Kuhsaft::BrickType.enabled.constrained(allowed_brick_types) end end end end
Version data entries
44 entries across 44 versions & 1 rubygems