Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个资源,我想在索引视图中显示来自另一个相关表的信息。我该怎么做?
谢谢您的帮助。答案是:
column "Account ID" do |refund| Account.find_by_character_name(refund.character_name).id end
您也可以使用关系查询它
column ("Car Model") { |user| user.car.attribute_name if user.car }