Class: ForemanPatch::Api::V2::GroupsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/foreman_patch/api/v2/groups_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



38
39
40
41
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 38

def create
  @group = Group.new(group_params)
  process_response @group.save
end

#destroyObject



52
53
54
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 52

def destroy
  process_response @group.destroy
end

#indexObject



17
18
19
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 17

def index
  @groups = resource_scope_for_index
end

#resource_classObject



56
57
58
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 56

def resource_class
  ForemanPatch::Group
end

#showObject



23
24
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 23

def show
end

#updateObject



46
47
48
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 46

def update
  process_response @group.update(group_params)
end