vendredi 13 septembre 2019

programmatically clear cache: Rails

I had setup a Rails form. Later I added a jquery-ui autocomplete widget:

View file:

<%= f.text_field :doc_owner, data: {autocomplete_source: User.order(:user_name).where("full_name <> ''").pluck(:full_name)} %>

js coffee file:

$('#doc_queue_doc_owner').autocomplete
  source: $('#doc_queue_doc_owner').data('autocomplete-source')

The users who have been to this form before DO NOT see this feature until they clear their browser cache. Can I clear cache through model?

Aucun commentaire:

Enregistrer un commentaire