delete shop scope in model

This commit is contained in:
Zin Moe
2020-01-13 18:41:37 +06:30
parent a3edbb07fd
commit 270c2a821e
20 changed files with 25 additions and 29 deletions

View File

@@ -8,7 +8,6 @@ class Menu < ApplicationRecord
#Default Scope to pull the active version only
default_scope { order("created_at asc") }
scope :active, -> {where("is_active = true")}
scope :shop, -> { where("menus.shop_code=?",Shop.current_shop.shop_code) }
def self.current_menu
today = DateTime.now
@@ -47,7 +46,7 @@ class Menu < ApplicationRecord
end
end
def self.import(file, created_by,shop)
def self.import(file, created_by)
status = ""
spreadsheet = open_spreadsheet(file)
if spreadsheet.sheets.count > 1