Class: ForemanPatch::Api::V2::GroupsController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanPatch::Api::V2::GroupsController
- Defined in:
- app/controllers/foreman_patch/api/v2/groups_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #resource_class ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
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 |
#destroy ⇒ Object
52 53 54 |
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 52 def destroy process_response @group.destroy end |
#index ⇒ Object
17 18 19 |
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 17 def index @groups = resource_scope_for_index end |
#resource_class ⇒ Object
56 57 58 |
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 56 def resource_class ForemanPatch::Group end |
#show ⇒ Object
23 24 |
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 23 def show end |
#update ⇒ Object
46 47 48 |
# File 'app/controllers/foreman_patch/api/v2/groups_controller.rb', line 46 def update process_response @group.update(group_params) end |