Sha256: ffdb592bac4ea42a63932135e5cac63d05ea59321741d0b0b388dc0a0d5191c3

Contents?: true

Size: 678 Bytes

Versions: 15

Compression:

Stored size: 678 Bytes

Contents

require_dependency "antispam/application_controller"

module Antispam
  class BlocksController < ApplicationController
    before_action :must_be_admin
    before_action :set_block, only: [:show]

    # GET /blocks
    def index
      @blocks = Block.all
    end

    # GET /blocks/1
    def show
    end

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

      # Only allow a list of trusted parameters through.
      def block_params
        params.require(:block).permit(:ip, :provider, :controllername, :actionname)
      end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
antispam-0.3.3 app/controllers/antispam/blocks_controller.rb
antispam-0.3.2 app/controllers/antispam/blocks_controller.rb
antispam-0.3.1 app/controllers/antispam/blocks_controller.rb
antispam-0.3.0 app/controllers/antispam/blocks_controller.rb
antispam-0.2.11 app/controllers/antispam/blocks_controller.rb
antispam-0.2.10 app/controllers/antispam/blocks_controller.rb
antispam-0.2.8 app/controllers/antispam/blocks_controller.rb
antispam-0.2.6 app/controllers/antispam/blocks_controller.rb
antispam-0.2.5 app/controllers/antispam/blocks_controller.rb
antispam-0.2.4 app/controllers/antispam/blocks_controller.rb
antispam-0.2.3 app/controllers/antispam/blocks_controller.rb
antispam-0.1.4 app/controllers/antispam/blocks_controller.rb
antispam-0.1.3 app/controllers/antispam/blocks_controller.rb
antispam-0.1.2 app/controllers/antispam/blocks_controller.rb
antispam-0.1.1 app/controllers/antispam/blocks_controller.rb