Class: PolicyManager::CategoriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/policy_manager/categories_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin_user, #allow_admins, #current_user, #doc, #set_language, #user_authenticated?

Instance Method Details

#indexObject

GET /categories



9
10
11
# File 'app/controllers/policy_manager/categories_controller.rb', line 9

def index
  @categories = PolicyManager::Config.rules
end

#showObject

GET /categories/1



14
15
16
17
18
# File 'app/controllers/policy_manager/categories_controller.rb', line 14

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