From e53de93bee483acaccb756dacd871c15b703f739 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 4 Apr 2016 18:16:27 +0200 Subject: [PATCH] removes the prefix from spending_proposal_code --- app/models/spending_proposal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spending_proposal.rb b/app/models/spending_proposal.rb index 8532a7f8a..f11dc71c3 100644 --- a/app/models/spending_proposal.rb +++ b/app/models/spending_proposal.rb @@ -102,7 +102,7 @@ class SpendingProposal < ActiveRecord::Base end def code - "#{Setting["proposal_code_prefix"]}-#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") + "#{created_at.strftime('%Y')}-#{id}" + (administrator.present? ? "-A#{administrator.id}" : "") end def send_unfeasible_email