mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-31 06:31:41 +00:00
Allow fast checkout without re-accepting old terms
We did that for the shop's terms already and now do it for the platform terms as well.
This commit is contained in:
@@ -13,4 +13,10 @@ class TermsOfServiceFile < ApplicationRecord
|
||||
def self.current_url
|
||||
current&.attachment&.url || Spree::Config.footer_tos_url
|
||||
end
|
||||
|
||||
# If no file has been uploaded, we don't know when the old terms have
|
||||
# been updated last. So we return the most recent possible update time.
|
||||
def self.updated_at
|
||||
current&.updated_at || Time.zone.now
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user