Sha256: e787ee2d52c0bc67b140847d01590afc5857e9a9db2ea465a1262fe2f5f6a4b2
Contents?: true
Size: 609 Bytes
Versions: 14
Compression:
Stored size: 609 Bytes
Contents
module RailsAdmin module Config # Defines a visibility configuration module Hideable # Visibility defaults to true. def self.included(klass) klass.register_instance_option(:visible?) do !root.try :excluded? end end # Reader whether object is hidden. def hidden? not visible end # Writer to hide object. def hide(&block) visible block ? proc { false == (instance_eval &block) } : false end # Writer to show field. def show(&block) visible block || true end end end end
Version data entries
14 entries across 14 versions & 4 rubygems