Files
growstuff/app/controllers/admin_controller.rb
Daniel O'Connor b77df88df9 Issues/1475: Ensure we have pagination (#3193)
* Paginate, 100 at a time

* Limited i18n

* Paginate roles

* Pagination

* Pagination

* i18n and pagination

* Paginate alternate names

* Silence code climate

* Rewrite coverage as a feature

* Remove coverage in favour of crops/scientific_name_spec

* Add missing admin link

* Rewrite coverage as feature

* Rewrite coverage

---------

Co-authored-by: Brenda Wallace <brenda@wallace.net.nz>
2024-01-21 14:19:36 +10:30

15 lines
324 B
Ruby

# frozen_string_literal: true
class AdminController < ApplicationController
respond_to :html
def index
authorize! :manage, :all
end
def newsletter
authorize! :manage, :all
@members = Member.confirmed.wants_newsletter.all.paginate(page: params[:page], per_page: 100)
respond_with @members
end
end