Sha256: 706f670bc350b4bd4685e33ac0c9a9a903b00aaf99286d52b26dc2c4fa5c6fc1
Contents?: true
Size: 540 Bytes
Versions: 1
Compression:
Stored size: 540 Bytes
Contents
class Unico::Agency < Unico::Model self.abstract_class = true self.table_name = :unico_agencies attr_modal :name, :number, :bank_id belongs_to :bank, class_name: '::Bank' has_many :bank_accounts, dependent: :restrict_with_exception validates :name, :number, :digit, :bank, presence: true validates :email, mail: true, allow_blank: true validates :phone, :fax, mask: '(99) 9999-9999', allow_blank: true orderize filterize def self.bank_id(bank_id) where(bank_id: bank_id) end def to_s name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unico-training-7.8.0 | app/models/unico/agency.rb |