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



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

#destroyObject



21
22
23
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 21

def destroy
  @category.destroy
end

#editObject



5
6
7
# File 'app/controllers/comfy/admin/cms/categories_controller.rb', line 5

def edit
  render
end

#updateObject



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