From 6257d0524bfb1247f04538b9fde2a7ddb7b15d2a Mon Sep 17 00:00:00 2001 From: Lunar Date: Fri, 7 Jun 2013 15:02:25 +0200 Subject: [PATCH 1/1] Enable Member#filename_for_id to work with strings --- lib/nos_oignons/member.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/nos_oignons/member.rb b/lib/nos_oignons/member.rb index a67581c..32d32f7 100644 --- a/lib/nos_oignons/member.rb +++ b/lib/nos_oignons/member.rb @@ -35,7 +35,12 @@ module NosOignons end def filename_for_id(member_id) - "#{NosOignons::Member.db_path}/%06d.mdwn" % member_id + case member_id + when String + "#{NosOignons::Member.db_path}/#{member_id}.mdwn" + when Integer + "#{NosOignons::Member.db_path}/%06d.mdwn" % member_id + end end def read_from_git(ref, file) -- 2.39.5