Simplify imageable/documentable note method names
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<div class="documents-list">
|
<div class="documents-list">
|
||||||
<%= f.label :documents, t("documents.form.title") %>
|
<%= f.label :documents, t("documents.form.title") %>
|
||||||
<p class="help-text"><%= documentables_note %></p>
|
<p class="help-text"><%= note %></p>
|
||||||
|
|
||||||
<div id="nested-documents" data-max-documents-allowed="<%= max_documents_allowed %>">
|
<div id="nested-documents" data-max-documents-allowed="<%= max_documents_allowed %>">
|
||||||
<%= f.fields_for :documents do |documents_builder| %>
|
<%= f.fields_for :documents do |documents_builder| %>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Documents::NestedComponent < ApplicationComponent
|
|||||||
documentable.class.max_documents_allowed
|
documentable.class.max_documents_allowed
|
||||||
end
|
end
|
||||||
|
|
||||||
def documentables_note
|
def note
|
||||||
t "documents.form.note", max_documents_allowed: max_documents_allowed,
|
t "documents.form.note", max_documents_allowed: max_documents_allowed,
|
||||||
accepted_content_types: documentable_humanized_accepted_content_types(documentable.class),
|
accepted_content_types: documentable_humanized_accepted_content_types(documentable.class),
|
||||||
max_file_size: max_file_size(documentable.class)
|
max_file_size: max_file_size(documentable.class)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<%= f.label image_fields, t("images.form.title") %>
|
<%= f.label image_fields, t("images.form.title") %>
|
||||||
<p class="help-text"><%= imageables_note %></p>
|
<p class="help-text"><%= note %></p>
|
||||||
|
|
||||||
<div id="nested-image">
|
<div id="nested-image">
|
||||||
<%= f.fields_for image_fields do |image_builder| %>
|
<%= f.fields_for image_fields do |image_builder| %>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class Images::NestedComponent < ApplicationComponent
|
|||||||
f.object
|
f.object
|
||||||
end
|
end
|
||||||
|
|
||||||
def imageables_note
|
def note
|
||||||
t "images.form.note", accepted_content_types: imageable_humanized_accepted_content_types,
|
t "images.form.note", accepted_content_types: imageable_humanized_accepted_content_types,
|
||||||
max_file_size: imageable_max_file_size
|
max_file_size: imageable_max_file_size
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user