Sha256: 351a7cbf02635435212d591c5589056edbaa9de2a1cc4dc757214ec47dc87793
Contents?: true
Size: 714 Bytes
Versions: 21
Compression:
Stored size: 714 Bytes
Contents
class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController def index @attachments = Ckeditor.attachment_file_model.find_all(ckeditor_attachment_files_scope) respond_with(@attachments) end def create @attachment = Ckeditor::AttachmentFile.new respond_with_asset(@attachment) end def destroy @attachment.destroy respond_with(@attachment, :location => attachment_files_path) end protected def find_asset @attachment = Ckeditor.attachment_file_model.get!(params[:id]) end def authorize_resource model = (@attachment || Ckeditor::AttachmentFile) @authorization_adapter.try(:authorize, params[:action], model) end end
Version data entries
21 entries across 21 versions & 2 rubygems