Class: Admin::DeedCategoriesController

Inherits:
AdminController
  • Object
show all
Includes:
EntityPriority, ToggleableEntity
Defined in:
app/controllers/admin/deed_categories_controller.rb

Overview

Administrative part of deed category management

Instance Method Summary collapse

Instance Method Details

#add_deedObject

put /admin/deed_categories/:id/deeds/:deed_id



21
22
23
24
25
26
# File 'app/controllers/admin/deed_categories_controller.rb', line 21

def add_deed
  @entity.add_deed(@deed)
  NetworkEntitySyncJob.perform_later(@deed.class.to_s, @deed.id)

  head :no_content
end

#indexObject

get /admin/deed_categories



12
13
14
# File 'app/controllers/admin/deed_categories_controller.rb', line 12

def index
  @collection = DeedCategory.siblings(nil).list_for_administration
end

#remove_deedObject

delete /admin/deed_categories/:id/deeds/:deed_id



29
30
31
32
33
34
# File 'app/controllers/admin/deed_categories_controller.rb', line 29

def remove_deed
  @entity.remove_deed(@deed)
  NetworkEntitySyncJob.perform_later(@deed.class.to_s, @deed.id)

  head :no_content
end

#showObject

get /admin/deed_categories/:id



17
18
# File 'app/controllers/admin/deed_categories_controller.rb', line 17

def show
end