Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas
Created March 3, 2021 15:09
Embed
What would you like to do?
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