- #TODO: There should be a better way to do this. CloseConditions are ignored at the moment
-
- bugs2 = MapBug.find(:all, :limit => limit, :order => "last_changed DESC", :joins => :map_bug_comment, :include => :map_bug_comment,
- :conditions => conditions)
- @bugs = bugs2.uniq
- respond_to do |format|
- format.html {render :template => 'map_bugs/get_bugs.js', :content_type => "text/javascript"}
- format.rss {render :template => 'map_bugs/get_bugs.rss'}
- format.js
- format.xml {render :template => 'map_bugs/get_bugs.xml'}
- format.json { render :json => @bugs.to_json(:methods => [:lat, :lon], :only => [:id, :status, :date_created], :include => { :map_bug_comment => { :only => [:commenter_name, :date_created, :comment]}}) }
-# format.gpx {render :template => 'map_bugs/get_bugs.gpx'}
- end
+ #TODO: There should be a better way to do this. CloseConditions are ignored at the moment
+
+ bugs2 = MapBug.find(:all, :limit => limit, :order => "last_changed DESC", :joins => :comments, :include => :comments,
+ :conditions => conditions)
+ @bugs = bugs2.uniq
+ respond_to do |format|
+ format.html {render :template => 'map_bugs/get_bugs.js', :content_type => "text/javascript"}
+ format.rss {render :template => 'map_bugs/get_bugs.rss'}
+ format.js
+ format.xml {render :template => 'map_bugs/get_bugs.xml'}
+ format.json { render :json => @bugs.to_json(:methods => [:lat, :lon], :only => [:id, :status, :date_created], :include => { :comments => { :only => [:commenter_name, :date_created, :comment]}}) }
+ format.gpx {render :template => 'map_bugs/get_bugs.gpx'}
+ end