Ruby On Rails Active Admin has_many changes the text to use a different column

This is similar to my previous question. Ruby On Rails Active Admin has_many changes the drop-down list to use a different column

I figured out how to reassign f.inputs , but how can I redistribute the display of data when viewing an element ...

eg:

enter image description here

Public Git Repo: https://github.com/gorelative/TestApp

Code snippet that I have in my fillups.rb

 ActiveAdmin.register Fillup do form do |f| f.inputs do f.input :car, :collection => Car.all.map{ |car| [car.description, car.id] } f.input :comment f.input :cost f.input :mileage f.input :gallons f.buttons end end end 
0
source share
1 answer

Change show action

 ActiveAdmin.register Fillup do # ... other stuff show do attributes_table do # add your other rows row :id row :car do |fillup| link_to fillup.car.description, admin_car_path(fillup.car) end end end end 
+2
source

Source: https://habr.com/ru/post/1387231/


All Articles