module DbInit extend ActiveSupport::Concern module ClassMethods def init_db self.destroy_all ActiveRecord::Base.connection.reset_pk_sequence!(self.table_name) end end end