When one retrieves a Rails model object, how are the column (or object attribute) names accessed?
User.column_names
Like a lot of things in Rails, it just works :)
Example:
user = User.find(1) p user.attributes.keys