Sha256: df2f34f1ab639356572657cb70582d8e1f8f6c9de58d6d970e6a94f9bb8c593c

Contents?: true

Size: 601 Bytes

Versions: 32

Compression:

Stored size: 601 Bytes

Contents

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.5.8 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.7 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.6 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.5 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.4 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.3 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.2 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.1 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.5.0 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.22 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.21 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.20 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.19 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.18 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.17 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.16 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.15 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.14 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.13 app/controllers/cms_admin/categories_controller.rb
comfortable_mexican_sofa-1.4.12 app/controllers/cms_admin/categories_controller.rb