Sha256: 9df0267737bfdcd6914b211332af8888a6c6db4b540b523ef4a5fb67ab0af55b
Contents?: true
Size: 425 Bytes
Versions: 19
Compression:
Stored size: 425 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
19 entries across 19 versions & 2 rubygems