change UI for all settings module

This commit is contained in:
phyusin
2017-11-22 16:28:17 +06:30
parent fb53f2cb75
commit afcf7725f5
33 changed files with 903 additions and 769 deletions

View File

@@ -6,7 +6,8 @@ class MenuCategory < ApplicationRecord
belongs_to :parent, :class_name => "MenuCategory", foreign_key: "menu_category_id", optional: true
has_many :menu_items
validates_presence_of :name, :menu, :order_by
validates_presence_of :code, :name, :menu, :order_by
validates_uniqueness_of :code
default_scope { order('order_by asc') }
scope :active, -> {where("is_available = 1")}