Class: Comfy::Admin::Cms::CategoriesController
- Inherits:
-
BaseController
- Object
- BaseController
- Comfy::Admin::Cms::CategoriesController
- Defined in:
- app/controllers/comfy/admin/cms/categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 12 def create @category = @site.categories.create!(category_params) rescue ActiveRecord::RecordInvalid head :ok end |
#destroy ⇒ Object
24 25 26 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 24 def destroy @category.destroy end |
#edit ⇒ Object
8 9 10 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 8 def edit render end |
#update ⇒ Object
18 19 20 21 22 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 18 def update @category.update!(category_params) rescue ActiveRecord::RecordInvalid head :ok end |