Sha256: 459045f5eb012c31bce3624a719b4f29ec0a411b5fc5e141b3dbaf3d05bacc8a
Contents?: true
Size: 752 Bytes
Versions: 22
Compression:
Stored size: 752 Bytes
Contents
class Ckeditor::PicturesController < Ckeditor::ApplicationController def index @pictures = Ckeditor.picture_adapter.find_all(ckeditor_pictures_scope) @pictures = Ckeditor::Paginatable.new(@pictures).page(params[:page]) respond_with(@pictures, :layout => @pictures.first_page?) end def create @picture = Ckeditor.picture_model.new respond_with_asset(@picture) end def destroy @picture.destroy respond_with(@picture, :location => pictures_path) end protected def find_asset @picture = Ckeditor.picture_adapter.get!(params[:id]) end def authorize_resource model = (@picture || Ckeditor.picture_model) @authorization_adapter.try(:authorize, params[:action], model) end end
Version data entries
22 entries across 22 versions & 2 rubygems