Sha256: 177c180ff26d1c6cfdc0156fc4b712cc073d6749ecc72ad30d5dac444762c326
Contents?: true
Size: 493 Bytes
Versions: 9
Compression:
Stored size: 493 Bytes
Contents
# encoding: utf-8 module Sunrise module Models module Header extend ActiveSupport::Concern included do belongs_to :headerable, :polymorphic => true end module ClassMethods 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
9 entries across 9 versions & 1 rubygems