]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/changeset_comments_controller.rb
Fix new rubocop warnings
[rails.git] / app / controllers / api / changeset_comments_controller.rb
index bb77e1106609b2cea7b0190a61fcb160fd4032b0..e8d3f4c3a8df2c5dbcc1ae77f864d77057846449 100644 (file)
@@ -42,7 +42,7 @@ module Api
 
       # Return a copy of the updated changeset
       @changeset = changeset
-      render "api/changesets/changeset"
+      render "api/changesets/show"
 
       respond_to do |format|
         format.xml
@@ -67,7 +67,7 @@ module Api
 
       # Return a copy of the updated changeset
       @changeset = comment.changeset
-      render "api/changesets/changeset"
+      render "api/changesets/show"
 
       respond_to do |format|
         format.xml
@@ -92,7 +92,7 @@ module Api
 
       # Return a copy of the updated changeset
       @changeset = comment.changeset
-      render "api/changesets/changeset"
+      render "api/changesets/show"
 
       respond_to do |format|
         format.xml
@@ -105,7 +105,7 @@ module Api
     ##
     # Check if the current user has exceed the rate limit for comments
     def rate_limit_exceeded?
-      recent_comments = current_user.changeset_comments.where("created_at >= ?", Time.now.utc - 1.hour).count
+      recent_comments = current_user.changeset_comments.where(:created_at => Time.now.utc - 1.hour..).count
 
       recent_comments >= current_user.max_changeset_comments_per_hour
     end