简体   繁体   中英

Import in Rails Admin problems with belongs_to

In my app i use rails_admin and install rails_admin_import.

Model 'Team' :id, :name, :image_url, and belongs_to Sports.

If i try import CSV id, name, image_url, sport_id 1, Toronto, , 1

Program created new record but sport is Null.

I was using rails_admin_import 1.3.0 and specified "Related fields mapping" to appropriate column in the other table. It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM