1

如何控制字段在活动管理员编辑页面上的显示顺序?为了自定义视图页面,我更新了 admin/model 文件:

ActiveAdmin.register Church do
  menu :priority => 2
  scope :inactive
  scope :unregistered
  scope :active
  scope :registered

  show do
    attributes_table :name, :address1, :address2, :city, :state, :zip, :office_phone,
                 :fax, :email1, :active, :registered
  end

但是,将“show”更改为“edit”或“new”会导致无方法错误。

4

1 回答 1

4

只需更改您的项目的顺序,attributes_tableActiveAdmin 将使用该顺序显示。

更新:对于编辑页面...

form do |f|
  f.inputs "Label" do
    f.input :name
    f.input :address1
    # etc
  end
end
于 2011-11-09T23:22:53.583 回答