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