Sha256: cb54b680ab5b0377f4e4f02a96bdb1a5fe09314c6607d5274c9cfbcf3328dfb2
Contents?: true
Size: 868 Bytes
Versions: 15
Compression:
Stored size: 868 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware" # Note we rely on template inheritance with this MDM Base class i.e. subclasses (e.g. # HD::MDMPatientsController) can override templates and partials (e.g. add a _filters partial # or override the _patient partial to replace what is displayed in the table). # Otherwise the default template location is of course app/views/renalware/mdm_patients. module Renalware class UsersController < BaseController include Pagy::Backend def index query = params.fetch(:q, {}) query[:s] ||= "family_name" search = User .includes(:roles) .where.not(username: [:rwdev, :systemuser]) .ransack(query) pagy, users = pagy(search.result(distinct: true)) authorize users render locals: { users: users, pagy: pagy, user_search: search } end end end
Version data entries
15 entries across 15 versions & 1 rubygems