Sha256: 590610f7c7760997b39af312a8949f5735a1cfb43977af62f53f361761428790

Contents?: true

Size: 408 Bytes

Versions: 6

Compression:

Stored size: 408 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]}
    end

    private
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gdpr_rails-0.3.1 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.3.0 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.2.4 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.2.2 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.2.1 app/controllers/policy_manager/categories_controller.rb
gdpr_rails-0.2.0 app/controllers/policy_manager/categories_controller.rb