Sha256: 06e7bc2e3389d8c90c14d14bb8fd0f3eac5fe271b063e5a748888320cfef9a78
Contents?: true
Size: 481 Bytes
Versions: 10
Compression:
Stored size: 481 Bytes
Contents
module Tenon class ApplicationDecorator < Draper::Decorator delegate_all def serializer_class "#{object.class}Serializer".safe_constantize end def path h.url_for(object) end def edit_path h.url_for([:edit, object]) end def published? if object.try(:publish_at) object.publish_at <= Time.now elsif object.respond_to?(:published) object.published else true end end end end
Version data entries
10 entries across 10 versions & 1 rubygems