Sha256: ace5e9ee06864bfca452462fe61791e7b5bb9e2e99fd6008078c98f98726543c
Contents?: true
Size: 426 Bytes
Versions: 7
Compression:
Stored size: 426 Bytes
Contents
module AbAdmin module Models module Header extend ActiveSupport::Concern included do belongs_to :headerable, :polymorphic => true end def empty? [keywords, description, title].map(&:blank?).all? end def has_info? !empty? end def read(key) value = read_attribute(key) value.blank? ? nil : value end end end end
Version data entries
7 entries across 7 versions & 1 rubygems