From 9ab8111022ca945fa2cb604e8779954442659046 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 7 Jul 2013 17:58:15 +0100 Subject: [PATCH] Replace deprecated `scoped` method with `all` --- app/controllers/changeset_controller.rb | 4 ++-- app/controllers/notes_controller.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 5575e47bf..36b3b5124 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -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]) diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index cab04a0b9..f7344c211 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -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 -- 2.39.5