Sha256: 5b2c09b0042773ab7fd0c6e79a7df3ef711faa16cdae7599f40a96b8a0e1a844

Contents?: true

Size: 723 Bytes

Versions: 40

Compression:

Stored size: 723 Bytes

Contents

class CmsAdmin::CategoriesController < CmsAdmin::BaseController
  
  before_filter :load_category,  :only => [:edit, :update, :destroy]
  
  def edit
    render
  end
  
  def create
    @category = @site.categories.create!(params[:category])
  rescue ActiveRecord::RecordInvalid
    logger.detailed_error($!)
    render :nothing => true
  end
  
  def update
    @category.update_attributes!(params[:category])
  rescue ActiveRecord::RecordInvalid
    logger.detailed_error($!)
    render :nothing => true
  end
  
  def destroy
    @category.destroy
  end
  
protected
  
  def load_category
    @category = @site.categories.find(params[:id])
  rescue ActiveRecord::RecordNotFound
    render :nothing => true
  end
  
end

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
comfortable_mexican_sofa-1.6.31 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.5 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.4 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.3 app/controllers/cms_admin/categories_controller.rb
comfypress-0.1.4 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.2 app/controllers/cms_admin/categories_controller.rb
comfypress-0.1.3 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.1 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.8.0 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.30 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.7.3 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.7.1 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.7.0 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.26 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.25 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.24 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.23 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.22 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.21 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.6.20 app/controllers/cms_admin/categories_controller.rb