Files
sx-fc/app/models/account.rb
2017-10-23 11:38:10 +06:30

10 lines
198 B
Ruby
Executable File

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