adding items belongs_to relationship to Active Admin

后端 未结 1 1672
执笔经年
执笔经年 2021-01-16 08:36

I\'m using active admin for my rails app. I have a customer model which belongs_to a department and also belongs_to a delivery_time.

In my admin folder I have a cus

相关标签:
1条回答
  • 2021-01-16 09:16

    The columns in the index can be customized this way:

      index do |customer|
          column :department, :sortable => false
          column "Delivery time", :sortable => false do |cust|
              cust.delivery_time.strftime("%X")
          end
      end
    

    See the ActiveAdmin doc for reference

    0 讨论(0)
提交回复
热议问题