OrderSerializer#changes_allowed_until returns 'Not allowed' unless changes are allowed

This commit is contained in:
Rob Harrington
2017-04-12 16:06:58 +10:00
parent 7ea74ccf4a
commit 840c936a6f
2 changed files with 2 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ module Api
end
def changes_allowed_until
return I18n.t(:not_allowed) unless object.changes_allowed?
I18n.l(object.order_cycle.andand.orders_close_at, format: :long)
end

View File

@@ -645,6 +645,7 @@ en:
terms_of_service: "Terms of service"
on_demand: On demand
none: None
not_allowed: Not allowed
label_shops: "Shops"
label_map: "Map"