Class: Admin::PostGroupsController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::PostGroupsController
- Includes:
- EntityPriority, ToggleableEntity
- Defined in:
- app/controllers/admin/post_groups_controller.rb
Overview
Administrative part of post group management
Instance Method Summary collapse
-
#add_category ⇒ Object
put /admin/post_groups/:id/categories/:category_id.
-
#add_tag ⇒ Object
put /admin/post_groups/:id/tags/:tag_id.
-
#index ⇒ Object
get /admin/post_groups.
-
#remove_category ⇒ Object
delete /admin/post_groups/:id/categories/:category_id.
-
#remove_tag ⇒ Object
delete /admin/post_groups/:id/tags/:tag_id.
-
#show ⇒ Object
get /admin/post_groups/:id.
-
#tags ⇒ Object
get /admin/post_groups/:id/tags?q=.
Instance Method Details
#add_category ⇒ Object
put /admin/post_groups/:id/categories/:category_id
20 21 22 23 24 |
# File 'app/controllers/admin/post_groups_controller.rb', line 20 def add_category @entity.add_category(PostCategory.find_by(id: params[:category_id])) head :no_content end |
#add_tag ⇒ Object
put /admin/post_groups/:id/tags/:tag_id
39 40 41 42 43 |
# File 'app/controllers/admin/post_groups_controller.rb', line 39 def add_tag @entity.add_tag(PostTag.find_by(id: params[:tag_id])) head :no_content end |
#index ⇒ Object
get /admin/post_groups
11 12 13 |
# File 'app/controllers/admin/post_groups_controller.rb', line 11 def index @collection = PostGroup.list_for_administration end |
#remove_category ⇒ Object
delete /admin/post_groups/:id/categories/:category_id
32 33 34 35 36 |
# File 'app/controllers/admin/post_groups_controller.rb', line 32 def remove_category @entity.remove_category(PostCategory.find_by(id: params[:category_id])) head :no_content end |
#remove_tag ⇒ Object
delete /admin/post_groups/:id/tags/:tag_id
46 47 48 49 50 |
# File 'app/controllers/admin/post_groups_controller.rb', line 46 def remove_tag @entity.remove_tag(PostTag.find_by(id: params[:tag_id])) head :no_content end |
#show ⇒ Object
get /admin/post_groups/:id
16 17 |
# File 'app/controllers/admin/post_groups_controller.rb', line 16 def show end |
#tags ⇒ Object
get /admin/post_groups/:id/tags?q=
27 28 29 |
# File 'app/controllers/admin/post_groups_controller.rb', line 27 def @collection = PostTag.with_name_like(params[:q]).list_for_administration.first(50) end |