mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
Rails 5 introduced this new class to confine application-specific monkey patches to our models only, and not leak into other libraries using ActiveRecord::Base. https://bigbinary.com/blog/application-record-in-rails-5
6 lines
253 B
Ruby
6 lines
253 B
Ruby
class DistributorShippingMethod < ApplicationRecord
|
|
self.table_name = "distributors_shipping_methods"
|
|
belongs_to :shipping_method, class_name: "Spree::ShippingMethod", touch: true
|
|
belongs_to :distributor, class_name: "Enterprise", touch: true
|
|
end
|