This commit is contained in:
Nweni
2017-06-04 15:28:48 +06:30
parent f5b6445a21
commit 69d188d4c1

View File

@@ -9,6 +9,9 @@ class MenuItem < ApplicationRecord
default_scope { order('item_code asc') }
scope :simple_menu_item, -> { where(type: 'SimpleMenuItem') }
scope :set_menu_item, -> { where(type: 'SetMenuItem') }
def self.collection
MenuItem.select("id, name").map { |e| [e.name, e.id] }
end