Sha256: fadf8836537f7d010942cc61ba11bd9ae8dbb1dc0a049b1648160336ad3c8f32
Contents?: true
Size: 982 Bytes
Versions: 8
Compression:
Stored size: 982 Bytes
Contents
module Locomotive module Builder module Liquid module Drops class ContentEntry < Base delegate :seo_title, :meta_keywords, :meta_description, :to => '_source' def _label @_label ||= self._source._label end def _permalink @_source._permalink.try(:parameterize) end alias :_slug :_permalink def next self end def previous self end def errors (@_source.errors || []).inject({}) do |memo, name| memo[name] = ::I18n.t('errors.messages.blank') memo end end def before_method(meth) return '' if self._source.nil? if not @@forbidden_attributes.include?(meth.to_s) self._source.send(meth) else nil end end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems