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:
parent
eac7348ad2
commit
d0e291552e
5 changed files with 90 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue