I have a store_decorator - module StoreDecorator
def self.prepended(base)
base.has_many :products, class_name: ‘Spree::Product’
base.has_many :product_lists
base.belongs_to :user, class_name: ‘Spree::User’, optional: true
base.has_one :store_content, foreign_key: ‘spree_store_id’, dependent: :destroy
base.has_one :store_addrress, class_name: ‘StoreAddress’, foreign_key: ‘spree_store_id’
base.has_one :address, through: :store_addrress
# base.validates :name, presence: true
# base.validates :url, presence: true
# base.validates :meta_description, presence: true
# base.validates :meta_keywords, presence: true
end
_Spree_::_Store_.prepend self
end