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