Allow for different formats to the getBugs call

This is a rudimentary initial version of a GPX and a rss
format for looking at bugs in an area.
This commit is contained in:
Kai Krueger 2010-03-04 22:30:42 +00:00
parent eac7348ad2
commit d0e291552e
5 changed files with 90 additions and 19 deletions

View file

@ -29,4 +29,20 @@ class MapBug < ActiveRecord::Base
self.save;
end
def flatten_comment ( separator_char )
resp = ""
comment_no = 1
self.map_bug_comment.each do |comment|
resp += (comment_no == 1 ? "" : separator_char)
resp += comment.comment if comment.comment
resp += " [ "
resp += comment.commenter_name if comment.commenter_name
resp += " " + comment.date_created.to_s + " ]"
comment_no += 1
end
return resp
end
end