Sha256: c05646832bd6edecf8eee4b2aae76c5f543766256c005ccb8fd7d4c30e755e69

Contents?: true

Size: 530 Bytes

Versions: 2

Compression:

Stored size: 530 Bytes

Contents

require_dependency "policy_manager/application_controller"

module PolicyManager
  class CategoriesController < ApplicationController

    before_action :allow_admins 

    # GET /categories
    def index
      @categories = PolicyManager::Config.rules
    end

    # GET /categories/1
    def show
      @category = PolicyManager::Config.rules.find{|o| o.name == params[:id]}
      @terms = @category.terms.paginate(:page => params[:page], 
                                        :per_page => 12)
    end

    private
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gdpr_rails-0.3.3 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.3.2 app/controllers/policy_manager/categories_controller.rb