Sha256: 9bb8c825f957b088fa4d596fbf96f6b1730dd7123a7f9d6cc371388254162f8e

Contents?: true

Size: 638 Bytes

Versions: 21

Compression:

Stored size: 638 Bytes

Contents

class Ckeditor::PicturesController < Ckeditor::ApplicationController

  def index
    @pictures = Ckeditor.picture_model.find_all(ckeditor_pictures_scope)
    respond_with(@pictures) 
  end
  
  def create
    @picture = Ckeditor::Picture.new
	  respond_with_asset(@picture)
  end
  
  def destroy
    @picture.destroy
    respond_with(@picture, :location => pictures_path)
  end
  
  protected
  
    def find_asset
      @picture = Ckeditor.picture_model.get!(params[:id])
    end

    def authorize_resource
      model = (@picture || Ckeditor::Picture)
      @authorization_adapter.try(:authorize, params[:action], model)
    end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
glebtv-ckeditor-4.2.1.5 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.2.1.4 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.2.1.3 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.2.1.2 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.2.1.1 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.2.1 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.7 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.6 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.6 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.5 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.4 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.3 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.2 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1.1 app/controllers/ckeditor/pictures_controller.rb
glebtv-ckeditor-4.1.1 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.4 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.2 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.1 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.0 app/controllers/ckeditor/pictures_controller.rb
ckeditor-4.0.0.rc2 app/controllers/ckeditor/pictures_controller.rb