mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Shipping methods can be tagged
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
Spree::ShippingMethod.class_eval do
|
||||
acts_as_taggable
|
||||
|
||||
has_many :distributor_shipping_methods
|
||||
has_many :distributors, through: :distributor_shipping_methods, class_name: 'Enterprise', foreign_key: 'distributor_id'
|
||||
|
||||
after_save :touch_distributors
|
||||
attr_accessible :distributor_ids, :description
|
||||
attr_accessible :require_ship_address
|
||||
attr_accessible :require_ship_address, :tag_list
|
||||
|
||||
validates :distributors, presence: { message: "^At least one hub must be selected" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user