attachment new version

This commit is contained in:
Andreas Stephanides
2015-04-07 23:21:33 +02:00
parent b04b23e647
commit 0df5e72e15
17 changed files with 273 additions and 43 deletions

View File

@@ -1,2 +1,9 @@
module AttachmentsHelper
def render_attachments_for(p)
a= Attachment.new
a.parent=p
render(partial:"attachments/attachment_list", object: p.attachments, locals: {editor: (can?(:edit, p)), parent: p} )+ ((can?(:edit, p))? (render partial:"attachments/form_bulk2", object: a ): "")
end
end