Created
November 1, 2019 09:58
-
-
Save abaldwin88/e9f3145d294e0adf09bf88930b887661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationRecord < ActiveRecord::Base | |
... | |
after_create_commit do | |
ActiveRecord::Base.connection.execute("CLUSTER #{self.class.table_name}") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment