class OxAccount < AbstractResource self.table_name = 'accounts' establish_connection ((Rails.env=="development") ? :dev_oxen_tables : :oxen_tables ) has_many :users, dependent: :destroy, foreign_key: 'account_id' has_many :printers, dependent: :destroy, foreign_key: 'account_id' has_many :services, dependent: :destroy, foreign_key: 'account_id' validates :name, presence: true end