Sha256: e4d273d67e12390bcf8931e0d0ae29e029038a1c98a6c41c29ab008427d73fd7
Contents?: true
Size: 508 Bytes
Versions: 5
Compression:
Stored size: 508 Bytes
Contents
module Irwi::Extensions::Controllers::WikiPageAttachments def add_attachment attachment = page_attachment_class.new(params[:wiki_page_attachment]) attachment.save redirect_to url_for( :action => :edit) end def remove_attachment attachment = page_attachment_class.find(params[:attachment_id]) attachment.destroy redirect_to url_for(:path => attachment.page.path, :action => :edit) end protected def page_attachment_class Irwi.config.page_attachment_class end end
Version data entries
5 entries across 5 versions & 1 rubygems