diff --git a/app/models/menu_item.rb b/app/models/menu_item.rb index 89967e2e..5f8b95cf 100644 --- a/app/models/menu_item.rb +++ b/app/models/menu_item.rb @@ -4,7 +4,7 @@ class MenuItem < ApplicationRecord has_many :menu_item_instances belongs_to :parent, :class_name => "MenuItem", foreign_key: "menu_item_id", :optional => true has_many :children, :class_name => "MenuItem", foreign_key: "menu_item_id" - belongs_to :account + belongs_to :account, :optional => true validates_presence_of :item_code, :name, :type, :min_qty, :taxable, :min_selectable_item, :max_selectable_item diff --git a/db/migrate/20170331024747_create_accounts.rb b/db/migrate/20170531024747_create_accounts.rb similarity index 100% rename from db/migrate/20170331024747_create_accounts.rb rename to db/migrate/20170531024747_create_accounts.rb