]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/map_bugs_controller.rb
Simplify URL scheme name matching in OAuth callback URLs a little
[rails.git] / app / controllers / map_bugs_controller.rb
index 8bd45bbcdefc3ec571eeb21ac87f972d5dd71ba8..bd91c1281c4ff8daf586a06fcd5861f995963a46 100644 (file)
@@ -42,7 +42,7 @@ class MapBugsController < ApplicationController
     @bugs = MapBug.find_by_area(@min_lat, @min_lon, @max_lat, @max_lon, :include => :comments, :order => "updated_at DESC", :limit => limit, :conditions => conditions)
 
     respond_to do |format|
-      format.html {render :template => 'map_bugs/get_bugs.js', :content_type => "text/javascript"}
+      format.html {render :template => 'map_bugs/get_bugs.rjs', :content_type => "text/javascript"}
       format.rss {render :template => 'map_bugs/get_bugs.rss'}
       format.js
       format.xml {render :template => 'map_bugs/get_bugs.xml'}
@@ -187,7 +187,7 @@ class MapBugsController < ApplicationController
                         :conditions => conditions)
     @bugs = bugs2.uniq
     respond_to do |format|
-      format.html {render :template => 'map_bugs/get_bugs.js', :content_type => "text/javascript"}
+      format.html {render :template => 'map_bugs/get_bugs.rjs', :content_type => "text/javascript"}
       format.rss {render :template => 'map_bugs/get_bugs.rss'}
       format.js
       format.xml {render :template => 'map_bugs/get_bugs.xml'}
@@ -226,7 +226,7 @@ class MapBugsController < ApplicationController
     @page_size = 10
 
     @bugs = MapBug.find(:all, 
-                        :include => [:comments, {:comments => :user}],
+                        :include => [:comments, {:comments => :author}],
                         :joins => :comments,
                         :order => "updated_at DESC",
                         :conditions => conditions,
@@ -302,10 +302,10 @@ private
 
     sent_to = Set.new
     bug.comments.each do | cmt |
-      if cmt.user
-        unless sent_to.include?(cmt.user)
-          Notifier.deliver_bug_comment_notification(bug_comment, cmt.user) unless cmt.user == @user
-          sent_to.add(cmt.user)
+      if cmt.author
+        unless sent_to.include?(cmt.author)
+          Notifier.deliver_bug_comment_notification(bug_comment, cmt.author) unless cmt.author == @user
+          sent_to.add(cmt.author)
         end
       end
     end