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
9 10 11 12 13 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 9 def create @category = @site.categories.create!(category_params) rescue ActiveRecord::RecordInvalid render :nothing => true end |
#destroy ⇒ Object
21 22 23 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 21 def destroy @category.destroy end |
#edit ⇒ Object
5 6 7 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 5 def edit render end |
#update ⇒ Object
15 16 17 18 19 |
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 15 def update @category.update_attributes!(category_params) rescue ActiveRecord::RecordInvalid render :nothing => true end |