foodsoft/app/models/bank_gateway.rb

9 lines
266 B
Ruby
Raw Normal View History

2021-03-05 12:43:40 +01:00
class BankGateway < ApplicationRecord
has_many :bank_accounts, dependent: :nullify
belongs_to :unattended_user, class_name: 'User', optional: true
scope :with_unattended_support, -> { where.not(unattended_user: nil) }
validates_presence_of :name, :url
end