lib/irwi/extensions/controllers/wiki_page_attachments.rb in irwi-0.4.0 vs lib/irwi/extensions/controllers/wiki_page_attachments.rb in irwi-0.4.1
- old
+ new
@@ -1,10 +1,10 @@
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)
+ redirect_to url_for(:path => attachment.page.path, :action => :edit)
end
def remove_attachment
attachment = page_attachment_class.find(params[:attachment_id])
attachment.destroy