Module: RolesHelper

Includes:
PermissionsHelper
Defined in:
lib/generators/permissify/views/template/roles_helper.rb

Instance Method Summary collapse

Methods included from PermissionsHelper

#additional_column_id, #category_allows_one_or_none, #category_name, #category_permissions, #clear_all_in_category, #click_associated_checkbox, #colorized_permission, #data_tag, #delete_tag, #edit_tag, #edit_url, #expand_category, #focus_and_select_first_additional_input, #form_path, #models_that_have_permission, #permission_click_actions, #permission_input, #permission_text_input, #permission_token, #permission_values, #permissions_group, #permissions_group_name, #permissions_sections, #product_permissions, #section_categories, #set_tag, #status_tag, #tag_for

Instance Method Details

#additional_column1_valueObject



4
# File 'lib/generators/permissify/views/template/roles_helper.rb', line 4

def additional_column1_value; @permissions_object.domain_type; end

#additional_column2_valueObject



5
# File 'lib/generators/permissify/views/template/roles_helper.rb', line 5

def additional_column2_value; "#{@permissions_object.users.count} users"; end

#all_rolesObject



6
# File 'lib/generators/permissify/views/template/roles_helper.rb', line 6

def all_roles; @lazy_all_roles ||= Role.all; end

#all_roles_grouped_by_domain_typeObject



3
# File 'lib/generators/permissify/views/template/roles_helper.rb', line 3

def all_roles_grouped_by_domain_type; all_roles.sort{|r1, r2| r1.domain_type <=> r2.domain_type}; end