Sha256: 2673ca14b17e9812c2a506737f78442f8b8a40884451b27f8727875e76a7d26e

Contents?: true

Size: 651 Bytes

Versions: 5

Compression:

Stored size: 651 Bytes

Contents

module ExceptionTrack
  class LogsController < ActionController::Base
    layout 'exception-track/application'
    before_action :set_log, only: [:show, :destroy]

    # GET /exception_logs
    def index
      @logs = Log.order('id desc').paginate(page: params[:page], per_page: 10)
    end

    # GET /exception_logs/1
    def show
    end

    # DELETE /exception_logs/all
    def all
      Log.delete_all
      redirect_to logs_url, notice: 'Logs was successfully destroyed.'
    end

    private
      # Use callbacks to share common setup or constraints between actions.
      def set_log
        @log = Log.find(params[:id])
      end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
exception-track-0.1.5 app/controllers/exception_track/logs_controller.rb
exception-track-0.1.4 app/controllers/exception_track/logs_controller.rb
exception-track-0.1.3 app/controllers/exception_track/logs_controller.rb
exception-track-0.1.2 app/controllers/exception_track/logs_controller.rb
exception-track-0.1.0 app/controllers/exception_track/logs_controller.rb