Skip to content

Commit

Permalink
fix: scope user resource for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
salzig committed Oct 7, 2024
1 parent 1fb3f7b commit ba94e33
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module Admin
class UsersController < Admin::ApplicationController
def index
super
@resources = User.peers.page(params[:page]).per(10)
end

def find_resource(param)
User.peers.from_slug(param)
end

def scoped_resource
User.peers
end

# See https://administrate-prototype.herokuapp.com/customizing_controller_actions
# for more information
end
Expand Down

0 comments on commit ba94e33

Please sign in to comment.