John Topley’s Weblog

Rails Tip #4: Listing Model Column Names

You can use the built-in Rails console script to ask any model class for its column names:

Model.column_names

Comments

There aren’t any comments on this post. Comments are closed.



Sign In