I have an Issue model and polymorphic attachments association. Pundit is used to handle authorization and strong parameters. When I use simple file input for attachment, like this:
<%= f.simple_fields_for :attachments do |attachments| %>
<%= attachments.input :file, as: :file %>
everything goes smooth, but when I add multiple for file input, pundit reject this attribute. Here's my permitted attribute method from policy
def permitted_attributes
[
:title, :description, :project,
assigned_users_attributes: [:_destroy, :id, :email],
attachments_attributes: [:file]
]
end
How should I change that to accept multiple file input?