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.


Archives

  • Jan
  • Feb
  • Mar
  • Apr
  • May
  • Jun
  • Jul
  • Aug
  • Sep
  • Oct
  • Nov
  • Dec
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014

More Archives


Sign In