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.
在 Rails 3.1 中,我如何计算对象的属性数量?
例如,我有一个名为 Projects 的对象,我想知道它有多少个属性(列)。
干得好:
Project.columns.size
文档在这里。