Sha256: 1049f2961b0ae421535f04e6bd9ae008f4ec05a8e89bbfc0cd6aebf9a6fff793
Contents?: true
Size: 540 Bytes
Versions: 83
Compression:
Stored size: 540 Bytes
Contents
module Tenon class ApplicationDecorator < Draper::Decorator delegate_all def path h.url_for(object) end def edit_path h.url_for([:edit, object]) end def edit_link(opts = {}) h.edit_link(object, opts) end def delete_link(opts = {}) h.delete_link(object, opts) 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
83 entries across 83 versions & 1 rubygems