ActiveAdmin Formtastic嵌套表单自定义html

时间:2016-05-23 20:00:09

标签: html ruby-on-rails activeadmin nested-forms formtastic

我在ActiveAdmin文件中有这样的代码

  form do |f|
    f.semantic_errors(*f.object.errors.keys)
    f.inputs do
      f.input :title
      f.has_many  :rights, new_record: false  do |ff|
        ff.input :klass_name
        # ff.insert_tag(Arbre::HTML::Div) { content_tag(:span, "foo") }
        ff.input :rights_per_class, as: :check_boxes, collection: ff.object.rights_list
        ff.actions
      end
    end
    f.actions
  end

我需要在权限部分(嵌套ff部分)中放置自定义HTML。如果我放置para 'foo'之类的内容,我会在页面顶部显示输出,ff.para 'foo'我收到错误NoMethod。

问题仅在于以嵌套形式推送自定义标签。

来自how to embed raw html in active_admin formtasticHow do I show custom html in the activeadmin form的解决方案没有帮助

比你

0 个答案:

没有答案