Add arguments to documentable concern to make it configurable for any recipient model.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= back_link_to budget_investments_path(investment.budget, heading_id: investment.heading) %>
|
||||
|
||||
<% if can?(:create, @document) && investment.documents.size < Budget::Investment::MAX_DOCUMENTS_SIZE %>
|
||||
<% if can?(:create, @document) && investment.documents.size < Budget::Investment.max_documents_allowed %>
|
||||
<%= link_to t("documents.upload_document"),
|
||||
new_document_path(documentable_id:investment, documentable_type: investment.class.name, from: request.url),
|
||||
class: 'button hollow float-right' %>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="tabs-panel" id="tab-documents">
|
||||
<%= render 'documents/documents',
|
||||
documents: @investment.documents,
|
||||
max_documents_size: Budget::Investment::MAX_DOCUMENTS_SIZE %>
|
||||
max_documents_allowed: Budget::Investment.max_documents_allowed %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user