Fix abilities definition and related specs

This commit is contained in:
Senén Rodero Rodríguez
2017-08-24 02:11:13 +02:00
parent 8e91bbe5b5
commit 0fbffdc73e
7 changed files with 13 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
<% if resource.documents.count < resource.class.max_documents_allowed %>
<%= link_to t("documents.form.add_new_document"),
new_document_path(documentable_type: resource.class.name, index: resource.documents.size),
new_nested_documents_path(documentable_type: resource.class.name, index: resource.documents.size),
remote: true,
id: "new_document_link" %>
<div class="max-documents-notice callout warning text-center hide">

View File

@@ -1,7 +1,7 @@
<%
nested_fields = render 'documents/nested_document', document: @document, index: params[:index]
new_document_link = link_to t("documents.form.add_new_document"),
new_document_path(documentable_type: params[:documentable_type], index: params[:index].to_i + 1),
new_nested_documents_path(documentable_type: params[:documentable_type], index: params[:index].to_i + 1),
remote: true,
id: "new_document_link"
%>