Sha256: ae857894f3942fc3076cf1c299389852cd3f33d49501395c3d08fac4b0eb2f20
Contents?: true
Size: 709 Bytes
Versions: 42
Compression:
Stored size: 709 Bytes
Contents
/* global show_flash */ $(function () { $('[data-hook=general_settings_clear_cache] #clear_cache').click(function () { if (confirm(Spree.translations.are_you_sure)) { $.ajax({ type: 'POST', url: Spree.routes.clear_cache, data: { authenticity_token: AUTH_TOKEN }, dataType: 'json' }).done(function () { show_flash('success', 'Cache was flushed.') }) .fail(function (message) { if (message.responseJSON['error']) { show_flash('error', message.responseJSON['error']) } else { show_flash('error', 'There was a problem while flushing cache.') } }) } }) })
Version data entries
42 entries across 42 versions & 1 rubygems