大佬教程收集整理的这篇文章主要介绍了ruby-on-rails – 窗体在使用渲染后不起作用,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
form do |f| f.inputs I18n.t('SALE_header') do f.input :client f.input :room end f.inputs I18n.t('SALE_items') do render :partial => "form_SALE" end f.inputs I18n.t('@R_132_10586@lization') do f.input :sub_@R_132_10586@l,:input_html => { :disabled => :true } f.input :discount f.input :@R_132_10586@l_value,:input_html => { :disabled => :true } end f.buttons end
插入render方法后,屏幕上只显示form_SALE内容.
任何帮助?
谢谢!
ActiveAdmin.register Post do form :partial => "form" end
然后在您的部分“_form.html.erb”中,您应该使用formtastic DSL,这样的东西:
<%= semantic_form_for [:admin,@post] do |f| %> <%= f.inputs @R_240_6964@,:body %> <%= f.buttons :commit %> <% end %>
在网页上明确说明:
If you require a more custom form than can be provided through the DSL,you can pass a partial in to render the form yourself.
这意味着active_admin的DSL有一些微小的限制.
我所有的“渲染”和“形式:部分”的实验都没有结果.如果你想使用partial,它应该替换所有的形式.
以上是大佬教程为你收集整理的ruby-on-rails – 窗体在使用渲染后不起作用全部内容,希望文章能够帮你解决ruby-on-rails – 窗体在使用渲染后不起作用所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。