Class: Admin::DeedCategoriesController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::DeedCategoriesController
- Includes:
- EntityPriority, ToggleableEntity
- Defined in:
- app/controllers/admin/deed_categories_controller.rb
Overview
Administrative part of deed category management
Instance Method Summary collapse
-
#add_deed ⇒ Object
put /admin/deed_categories/:id/deeds/:deed_id.
-
#index ⇒ Object
get /admin/deed_categories.
-
#remove_deed ⇒ Object
delete /admin/deed_categories/:id/deeds/:deed_id.
-
#show ⇒ Object
get /admin/deed_categories/:id.
Instance Method Details
#add_deed ⇒ Object
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 |
#index ⇒ Object
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_deed ⇒ Object
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 |
#show ⇒ Object
get /admin/deed_categories/:id
17 18 |
# File 'app/controllers/admin/deed_categories_controller.rb', line 17 def show end |