Sha256: 28b199042b41962df7cf10ec6dedaa87c42b38efc1714e538d726e4490c84d65

Contents?: true

Size: 684 Bytes

Versions: 3

Compression:

Stored size: 684 Bytes

Contents

require_dependency "antispam/application_controller"

module Antispam
  class ClearsController < ApplicationController
    before_action :must_be_admin
    before_action :set_clear, only: [:show, :edit, :update, :destroy]

    # GET /clears
    def index
      @clears = Clear.all
    end

    # GET /clears/1
    def show
    end

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

      # Only allow a list of trusted parameters through.
      def clear_params
        params.require(:clear).permit(:ip, :result, :answer, :threat_before, :threat_after)
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
antispam-0.2.0 app/controllers/antispam/clears_controller.rb
antispam-0.1.7 app/controllers/antispam/clears_controller.rb
antispam-0.1.5 app/controllers/antispam/clears_controller.rb