Sha256: 4291163f42d0cb6cf7a078c9a9846d36e03d87ed1cb95a1286ea468d3eb364e9
Contents?: true
Size: 614 Bytes
Versions: 26
Compression:
Stored size: 614 Bytes
Contents
class CmsAdmin::UploadsController < CmsAdmin::BaseController before_filter :load_cms_upload, :only => :destroy def index render end def create @cms_upload = @cms_site.cms_uploads.new(:uploaded_file => params[:file]) if @cms_upload.save render(:partial => 'cms_admin/uploads/upload', :object => @cms_upload) else render :nothing => true end end def destroy @cms_upload.destroy end protected def load_cms_upload @cms_upload = @cms_site.cms_uploads.find(params[:id]) rescue ActiveRecord::RecordNotFound render :nothing => true end end
Version data entries
26 entries across 26 versions & 1 rubygems