Files
sx-fc/app/models/account.rb
2017-06-06 17:29:34 +06:30

10 lines
249 B
Ruby

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