Skip to content

Commit

Permalink
Implement connects_to on base VACOLS::Record abstract class
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorntonMatthew committed Apr 18, 2024
1 parent d97385f commit 9115eab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/vacols/record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
class VACOLS::Record < ApplicationRecord
self.abstract_class = true

establish_connection "#{Rails.env}_vacols".to_sym
DATABASE_NAME = "#{Rails.env}_vacols".to_sym
connects_to database: { writing: DATABASE_NAME, reading: DATABASE_NAME }

ActiveSupport.run_load_hooks(:active_record_vacols, VACOLS::Record)

# This method calculates the appropriate date & timezone
Expand Down

0 comments on commit 9115eab

Please sign in to comment.