origin pull master

This commit is contained in:
Aung Myo
2017-06-03 13:44:10 +06:30
parent 7529d23147
commit 138850fb24
119 changed files with 2531 additions and 462 deletions

View File

@@ -1,8 +1,8 @@
class Menu < ApplicationRecord
has_many :menu_categories, dependent: :destroy
validates_presence_of :name, :is_active, :valid_days, :valid_time_from, :valid_time_to
validates_presence_of :name, :valid_days, :valid_time_from, :valid_time_to
validates_format_of :valid_days, :with => /\A([0-7]{1}(,[0-7]{1})*)?\Z/i
#Default Scope to pull the active version only
default_scope { where(is_active: true).order("created_at desc") }