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.
我有以下课程
class Foo < ActiveRecord::Base serialize: bar end
它应该包含一个鲜花列表(比如百合,茉莉花)。我应该使用什么格式来存储这些信息
数组
Foo.new.bar = %w(lilly jasmine)
或者任何可以通过 YAML 序列化的对象,查看这里