mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-21 05:09:15 +00:00
Tried using the rails generator, but as usual it was a waste of time becuase it doesn't handle unusual cases. I found more good guidance from that stackoverflow post: > why are you worrying about your indexes? Build your app! Something's not right in the model, see next commit.
7 lines
217 B
Ruby
7 lines
217 B
Ruby
# frozen_string_literal: true
|
|
|
|
class VariantLink < ApplicationRecord
|
|
belongs_to :source_variant, class_name: 'Spree::Variant', touch: true
|
|
belongs_to :target_variant, class_name: 'Spree::Variant', touch: true
|
|
end
|