]> git.openstreetmap.org Git - rails.git/commitdiff
Replace deprecated `scoped` method with `all`
authorTom Hughes <tom@compton.nu>
Sun, 7 Jul 2013 16:58:15 +0000 (17:58 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 21 Sep 2013 10:35:46 +0000 (11:35 +0100)
app/controllers/changeset_controller.rb
app/controllers/notes_controller.rb

index 5575e47bf3e914b96a6d82f4a7aa7ff4df83ff59..36b3b5124ed3b725d3cc518f33096dc2150c0cc5 100644 (file)
@@ -204,7 +204,7 @@ class ChangesetController < ApplicationController
 
     # create the conditions that the user asked for. some or all of
     # these may be nil.
-    changesets = Changeset.scoped
+    changesets = Changeset.all
     changesets = conditions_bbox(changesets, bbox)
     changesets = conditions_user(changesets, params['user'], params['display_name'])
     changesets = conditions_time(changesets, params['time'])
@@ -253,7 +253,7 @@ class ChangesetController < ApplicationController
     if request.format == :atom and params[:page]
       redirect_to params.merge({ :page => nil }), :status => :moved_permanently
     else
-      changesets = conditions_nonempty(Changeset.scoped)
+      changesets = conditions_nonempty(Changeset.all)
 
       if params[:display_name]
         user = User.find_by_display_name(params[:display_name])
index cab04a0b921a845dd647a8a99bd75f725b074173..f7344c2116b3b8e7eb3e39fd1d89014c3639c5bf 100644 (file)
@@ -30,7 +30,7 @@ class NotesController < ApplicationController
     end
 
     # Get any conditions that need to be applied
-    notes = closed_condition(Note.scoped)
+    notes = closed_condition(Note.all)
 
     # Check that the boundaries are valid
     bbox.check_boundaries
@@ -176,7 +176,7 @@ class NotesController < ApplicationController
   # Get a feed of recent notes and comments
   def feed
     # Get any conditions that need to be applied
-    notes = closed_condition(Note.scoped)
+    notes = closed_condition(Note.all)
 
     # Process any bbox
     if params[:bbox]
@@ -254,7 +254,7 @@ class NotesController < ApplicationController
     raise OSM::APIBadUserInput.new("No query string was given") unless params[:q]
 
     # Get any conditions that need to be applied
-    @notes = closed_condition(Note.scoped)
+    @notes = closed_condition(Note.all)
     @notes = @notes.joins(:comments).where("note_comments.body ~ ?", params[:q])
 
     # Find the notes we want to return