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
ドキュメントはこちら。