Class: Comfy::Admin::Cms::CategoriesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/comfy/admin/cms/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

#destroyObject



24
25
26
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 24

def destroy
  @category.destroy
end

#editObject



8
9
10
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 8

def edit
  render
end

#updateObject



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