我需要在ActiveAdmin页面中呈现部分内容.我正在尝试这样的事情:
form(:html => { :multipart => true }) do |f| f.inputs "Описание товара #{f.object.name if f.object.name}" do f.input :name,:required => true f.input :brand f.input :category f.input :created_at,:wrapper_html => { :class => 'inline-list' } f.input :updated_at,:wrapper_html => { :class => 'inline-list' } f.actions end content do render partial: 'fancybox' end end
解决方法
尝试使用f.template渲染:
form(:html => { :multipart => true }) do |f| f.inputs "Описание товара #{f.object.name if f.object.name}" do f.input :name,:required => true f.input :brand f.input :category f.input :created_at,:wrapper_html => { :class => 'inline-list' } f.input :updated_at,:wrapper_html => { :class => 'inline-list' } f.actions end f.inputs "fancybox" do f.template.render partial: 'fancybox' end end