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

Version Path
comfortable_mexican_sofa-1.0.28 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.27 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.26 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.25 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.24 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.23 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.22 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.21 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.20 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.19 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.18 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.17 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.16 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.15 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.14 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.13 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.12 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.11 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.10 app/controllers/cms_admin/uploads_controller.rb
comfortable_mexican_sofa-1.0.9 app/controllers/cms_admin/uploads_controller.rb