Project

General

Profile

Feature #35324 » members_index_preload.diff

Thomas Löber, 2021-05-28 12:27

View differences:

app/controllers/members_controller.rb
33 33
    @member_count = scope.count
34 34
    @member_pages = Paginator.new @member_count, @limit, params['page']
35 35
    @offset ||= @member_pages.offset
36
    @members =  scope.order(:id).limit(@limit).offset(@offset).to_a
36
    @members = scope.includes(:principal, :roles).order(:id).limit(@limit).offset(@offset).to_a
37 37

  
38 38
    respond_to do |format|
39 39
      format.html {head 406}
    (1-1/1)