Sha256: 1dada5897be1a6b33b5da4ec854e5976db70b5ec401a313c72745363bbf00388
Contents?: true
Size: 604 Bytes
Versions: 9
Compression:
Stored size: 604 Bytes
Contents
class CmsAdmin::UploadsController < CmsAdmin::BaseController skip_before_filter :load_fixtures before_filter :load_upload, :only => :destroy def index render end def create @upload = @site.uploads.create!(:file => params[:file]) render :partial => 'file', :object => @upload rescue ActiveRecord::RecordInvalid render :nothing => true, :status => :bad_request end def destroy @upload.destroy end protected def load_upload @upload = @site.uploads.find(params[:id]) rescue ActiveRecord::RecordNotFound render :nothing => true end end
Version data entries
9 entries across 9 versions & 1 rubygems