Sha256: 12777b773a1419678e550989824ac464e7b5a53e1948e50f50736c3e3186e905

Contents?: true

Size: 574 Bytes

Versions: 1

Compression:

Stored size: 574 Bytes

Contents

import './config'
import './channels'
import './controllers'
import './elements'

import { Turbo } from '@hotwired/turbo-rails'

document.addEventListener('pg:record-created', (ev) => {
  Turbo.visit(window.location)
  setTimeout(() => {
    Turbo.cache.clear()
  }, 1000)
})

document.addEventListener('pg:record-updated', (ev) => {
  Turbo.visit(window.location)
  setTimeout(() => {
    Turbo.cache.clear()
  }, 1000)
})

document.addEventListener('pg:record-destroyed', (ev) => {
  Turbo.visit(window.location)
  setTimeout(() => {
    Turbo.cache.clear()
  }, 1000)
})

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pg_rails-7.3.0 pg_layout/app/javascript/application.js