控制活动管理编辑页面上的字段顺序
如何控制字段在活动管理编辑页面上显示的顺序?为了自定义视图页面,我更新了管理/模型文件:
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
但是,将“显示”更改为“编辑”或“新建”会导致无方法错误。
How can I control the order in which fields appear on an active admin edit page? To customize the View page, I've updated admin/model file with:
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
However, changing "show" to "edit" or "new" results in a no-method error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

只需更改
attributes_table
中项目的顺序,ActiveAdmin 将使用该顺序进行显示。更新:对于编辑页面...
Just change the order of the items in your
attributes_table
and ActiveAdmin will use that order to display.update: for the edit page...