app/controllers/exception_track/logs_controller.rb in exception-track-0.2.0 vs app/controllers/exception_track/logs_controller.rb in exception-track-0.3.0
- old
+ new
@@ -1,25 +1,27 @@
+# frozen_string_literal: true
+
module ExceptionTrack
class LogsController < ActionController::Base
- layout 'exception-track/application'
- before_action :set_log, only: [:show, :destroy]
+ layout "exception-track/application"
+ before_action :set_log, only: %i[show destroy]
# GET /exception_logs
def index
- @logs = Log.order('id desc').page(params[:page]).per(15)
+ @logs = Log.order("id desc").page(params[:page]).per(15)
end
# GET /exception_logs/1
- def show
- end
+ def show; end
# DELETE /exception_logs/all
def all
Log.delete_all
- redirect_to logs_url, notice: 'Logs was successfully destroyed.'
+ 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