app/models/document.rb
# this is to support linking to documents which haven't get been published,
# but will be published within 5 seconds
this is to support linking to documents which haven't get been published,
but will be published within 5 seconds
this is to support linking to documents which haven ' t get been published but will be published within 5 seconds
def published_very_soon?
    Edition
      .scheduled
      .where("scheduled_publication <= ?", 5.seconds.from_now)
      .exists?(document_id: id)
  end
def published_very_soon? Edition . scheduled . where ( "scheduled_publication <= ?" , 5 . seconds . from_now ) . exists? ( document_id : id ) end
this is to support linking to documents which haven't get been published,
but will be published within 5 seconds
this is to support linking to documents which haven ' t get been published but will be published within 5 seconds