Skip to content

Instantly share code, notes, and snippets.

@ignaciojonas

ignaciojonas/style.rb Secret

Created Mar 3, 2021
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