Class: UiAnsibleRolesController

Inherits:
Api::V2::BaseController
  • Object
show all
Defined in:
app/controllers/ui_ansible_roles_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



6
7
8
# File 'app/controllers/ui_ansible_roles_controller.rb', line 6

def index
  @ui_ansible_roles = resource_scope_for_index(:permission => :view_ansible_roles)
end

#resource_name(resource = 'AnsibleRole') ⇒ Object



2
3
4
# File 'app/controllers/ui_ansible_roles_controller.rb', line 2

def resource_name(resource = 'AnsibleRole')
  super resource
end

#resource_scope(**kwargs) ⇒ Object

restore original method from find_common to ignore resource nesting



11
12
13
# File 'app/controllers/ui_ansible_roles_controller.rb', line 11

def resource_scope(**kwargs)
  @resource_scope ||= scope_for(resource_class, **kwargs)
end