schrodingersbox/status_cat

View on GitHub
app/controllers/status_cat/status_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
module StatusCat
  class StatusController < ApplicationController

    layout :set_layout

    before_action :_authenticate!
    before_action :_authorize!

    def index
      @checkers = StatusCat::Status.all
    end

    private

    def set_layout
      return StatusCat.config.layout
    end

    def _authenticate!
      instance_eval(&StatusCat.config.authenticate_with)
    end

    def _authorize!
      instance_eval(&StatusCat.config.authorize_with)
    end
  end
end