Conditionally loading an edit path for standing orders

ie. only if they have an id
This commit is contained in:
Rob Harrington
2016-11-30 11:07:56 +11:00
parent b253373d4d
commit 0196218d06

View File

@@ -23,6 +23,7 @@ class Api::Admin::StandingOrderSerializer < ActiveModel::Serializer
end
def edit_path
return '' unless object.id
edit_admin_standing_order_path(object)
end
end