Sha256: b32f0170d3c32e1cb11900e9f61668bdb38ca53c6da6cd3a1b8fba6bbbdd2841

Contents?: true

Size: 1.22 KB

Versions: 7

Compression:

Stored size: 1.22 KB

Contents

require_dependency "policy_manager/application_controller"
module PolicyManager
  class PortabilityRequestsController < ApplicationController
    
    before_action :set_portability_request, only: :destroy
    before_action :allow_admins

    # GET /portability_requests
    def index
      @portability_requests = PortabilityRequest.order(created_at: :desc)
                                                .paginate(
                                                  :page => params[:page], 
                                                  :per_page => 10
                                                )
    end

    def confirm
      @portability_request = PortabilityRequest.find(params[:id])
      if @portability_request.confirm!
        redirect_to portability_requests_path
      end
    end

    # DELETE /portability_requests/1
    def destroy
      @portability_request = PortabilityRequest.find(params[:id]).destroy
      redirect_to portability_requests_url, notice: I18n.t("terms_app.portability_requests.index.destroyed")
    end

    private

    # Use callbacks to share common setup or constraints between actions.
    def set_portability_request
      @portability_request = PortabilityRequest.find(params[:id])
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gdpr_rails-0.5.1 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.5.0 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.4.0 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.3.4 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.3.3 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.3.2 app/controllers/policy_manager/portability_requests_controller.rb
gdpr_rails-0.3.1 app/controllers/policy_manager/portability_requests_controller.rb