Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created March 3, 2021 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ignaciojonas/39901d721f5bf0b860a604369a225590 to your computer and use it in GitHub Desktop.
Save ignaciojonas/39901d721f5bf0b860a604369a225590 to your computer and use it in GitHub Desktop.
class Style < ApplicationRecord
after_create_commit {broadcast_prepend_to "styles"}
after_update_commit {broadcast_replace_to "styles"}
after_destroy_commit {broadcast_remove_to "styles"}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment