class Account < ApplicationRecord validates_presence_of :title, :account_type has_many :menu_items def self.collection Account.select("id, title").map { |e| [e.title, e.id] } end end