Sha256: 1b021313a87d0b4b5cd614a79ffc555b80fb5c6df4555727d8065b785e662963

Contents?: true

Size: 712 Bytes

Versions: 11

Compression:

Stored size: 712 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

11 entries across 11 versions & 1 rubygems

Version Path
antispam-0.2.11 app/controllers/antispam/clears_controller.rb
antispam-0.2.10 app/controllers/antispam/clears_controller.rb
antispam-0.2.8 app/controllers/antispam/clears_controller.rb
antispam-0.2.6 app/controllers/antispam/clears_controller.rb
antispam-0.2.5 app/controllers/antispam/clears_controller.rb
antispam-0.2.4 app/controllers/antispam/clears_controller.rb
antispam-0.2.3 app/controllers/antispam/clears_controller.rb
antispam-0.1.4 app/controllers/antispam/clears_controller.rb
antispam-0.1.3 app/controllers/antispam/clears_controller.rb
antispam-0.1.2 app/controllers/antispam/clears_controller.rb
antispam-0.1.1 app/controllers/antispam/clears_controller.rb