You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: system_emails_controller.rb
    path of file: ./repos/consuldemocracy/app/controllers/admin
    
    the code of the file until where you have to start completion: class Admin::SystemEmailsController < Admin::BaseController
  before_action :load_sys
    
  def preview_pending
    case @system_email
    when "proposal_notification_digest"
      @previews = ProposalNotification.where(id: unsent_proposal_notifications_ids)
                                      .order(:id)
                                      .page(params[:page])
    end