Sha256: f5228573e6057f86a50429220c9470b81c834e0389469aeb84e8fbd425481f9a
Contents?: true
Size: 965 Bytes
Versions: 2
Compression:
Stored size: 965 Bytes
Contents
module Locomotive module Steam module Liquid module Drops class ContentEntry < Base delegate :seo_title, :meta_keywords, :meta_description, to: :@_source def _label @_label ||= @_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 @_source.nil? if not @@forbidden_attributes.include?(meth.to_s) @_source.send(meth) else nil end end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms_steam-0.1.1 | lib/locomotive/steam/liquid/drops/content_entry.rb |
locomotivecms_steam-0.1.0 | lib/locomotive/steam/liquid/drops/content_entry.rb |