From d62d3041b423bad0a57afc4c671c59ca4afaafa0 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Mon, 18 Nov 2024 11:45:02 +0500 Subject: [PATCH] 12878: add relations in model --- ...41011071014_update_item_name_to_product_in_od_report.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/migrate/20241011071014_update_item_name_to_product_in_od_report.rb b/db/migrate/20241011071014_update_item_name_to_product_in_od_report.rb index c9c2a09354..6344d91188 100644 --- a/db/migrate/20241011071014_update_item_name_to_product_in_od_report.rb +++ b/db/migrate/20241011071014_update_item_name_to_product_in_od_report.rb @@ -1,5 +1,10 @@ class UpdateItemNameToProductInOdReport < ActiveRecord::Migration[7.0] - class ReportRenderingOptions < ActiveRecord::Base; end + class ReportRenderingOptions < ActiveRecord::Base + self.belongs_to_required_by_default = false + + belongs_to :user, class_name: "Spree::User" + serialize :options, Hash, coder: YAML + end # OD: Orders and Distributors def up