Class: CmsAdmin::CategoriesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/cms_admin/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
13
14
# File 'app/controllers/cms_admin/categories_controller.rb', line 9

def create
  @category = @site.categories.create!(params[:category])
rescue ActiveRecord::RecordInvalid
  logger.detailed_error($!)
  render :nothing => true
end

#destroyObject



23
24
25
# File 'app/controllers/cms_admin/categories_controller.rb', line 23

def destroy
  @category.destroy
end

#editObject



5
6
7
# File 'app/controllers/cms_admin/categories_controller.rb', line 5

def edit
  render
end

#updateObject



16
17
18
19
20
21
# File 'app/controllers/cms_admin/categories_controller.rb', line 16

def update
  @category.update_attributes!(params[:category])
rescue ActiveRecord::RecordInvalid
  logger.detailed_error($!)
  render :nothing => true
end