我正在从activeadmin上传图像,并且得到
ActiveSupport::MessageVerifier::InvalidSignature
有什么办法解决这个问题?
这是我的表格部分
的编码<%=semantic_form_for [:admin, @product] do |f| %>
<!--product main image-->
<%= f.input :product_image, :as => :file,
:hint =>if @product.product_image.attached?
image_tag(@product.main_image_thumb)
end%>
<!--has many other product images-->
<%=f.input :other_product_images, :as => :file,input_html: { multiple: true }%>
<%if @product.other_product_images.attached?%>
<%@product.other_product_images.each do|img|%>
<div class="inline-imgs">
<%=image_tag(img, class: "other-img-thumb")%>
<div class="del-other-img-link">
<%=link_to "delete",del_other_image_admin_product_path(img.id),method: :delete,data: { confirm: 'Are you sure?' }%>
</div>
</div>
<%end%>
<%end%>
<%end%>
activeadmin产品创建和更新控制器是
def create
super do |success,failure|
success.html { redirect_to edit_admin_product_path(@product) }
end
end
def update
super do |success,failure|
success.html { redirect_to edit_admin_product_path(@product) }
end
end
我已经在开发环境中设置了active storage to local
。我也试图以部分形式添加multi-part true
,但是它不起作用。
我正在使用rails 5.2.3 and ruby 2.6.1
任何建议或解决方案将不胜感激。