在rails active admin中基于其他显示字段

时间:2018-12-17 14:35:47

标签: ruby-on-rails-5

我想根据表单输入显示在表单字段中吗?

    f.inputs do
      f.input :class_name, hint: 'use space as separator if want to use multiple'
    f.panel 'Linking' do
      f.input :link_use_page, hint: 'leave this checkbox and URL empty if you don\'t want this entry to be a link'
      if :link_use_page
        f.input :link_url 
      else
        f.input :link_page, collection: Page.by_hierarchy
      end
    end
    f.input :disclaimer

0 个答案:

没有答案