Sha256: 68a5ff34483847f410224c3fcc2c214c5d6f5ecd9f00f6916a0e28ae3670f276

Contents?: true

Size: 872 Bytes

Versions: 19

Compression:

Stored size: 872 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/hd/base_controller"
require "collection_presenter"

module Renalware
  module HD
    class TransmissionLogsController < BaseController
      include PresenterHelper
      include Renalware::Concerns::Pageable

      # NB be sure not to select the payload as this will slow things down.
      # The payload is loaded by clicking on a link in the table
      def index
        logs = TransmissionLog
          .order(created_at: :desc)
          .select(TransmissionLog.attribute_names - [:payload])
          .page(page).per(per_page)
        authorize logs
        render locals: { logs: logs }
      end

      def show
        log = TransmissionLog.find(params[:id])
        authorize log
        respond_to do |format|
          format.xml { render xml: log.payload }
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
renalware-core-2.0.62 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.61 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.60 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.58 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.57 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.56 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.55 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.54 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.53 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.52 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.51 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.50 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.48 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.47 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.46 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.45 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.44 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.43 app/controllers/renalware/hd/transmission_logs_controller.rb
renalware-core-2.0.42 app/controllers/renalware/hd/transmission_logs_controller.rb