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.
使用 simpleform 时,如何通过关联订购选择选项?我有这样的事情:
= f.association :color
您可以将collection选项传递给关联:
collection
= f.association :color, collection: Color.order('created_at ASC')