Simplify getting imageable/documentable in forms
The imageable/documentable object is always the object the form builder is based on; since we're already passing the form builder, we don't have to pass the object as well. The only exception are the poll answers. In this case, we're passing a new answer as the object. That's OK; the same hack that we're using to send the data to the answer URL without displaying existing attachments causes the form to keep working the same way.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
<% documentable = f.object %>
|
||||
|
||||
<div class="documents-list">
|
||||
<%= f.label :documents, t("documents.form.title") %>
|
||||
<p class="help-text"><%= documentables_note(documentable) %></p>
|
||||
|
||||
Reference in New Issue
Block a user