class Shop < ApplicationRecord #ShopDetail = Shop.find_by_id(1) # Shop Image Uploader mount_uploader :logo, ShopImageUploader has_many :accounts has_many :bookings has_many :cashier_terminals has_many :commissioners has_many :commissions has_many :customers has_many :dining_facilities has_many :dining_queues has_many :employees has_many :inventory_definitions has_many :item_sets has_many :lookups has_many :membership_settings has_many :menus has_many :order_queue_stations has_many :orders has_many :payment_journals has_many :payment_method_settings has_many :print_settings has_many :sales has_many :products has_many :promotions has_many :seed_generators has_many :stock_checks has_many :stock_journals has_many :surveys has_many :tax_profiles has_many :zones has_many :display_images has_many :shift_sales accepts_nested_attributes_for :display_images def file_data=(input_data) self.data = input_data.read end end