This article introduces how to check the contents (columns) of models (database tables) created with rails g model in the Ruby on Rails console (rails c).
irb(main):011:0> Userinfo.columns.map(&:name)
=> ["id", "name", "created_at", "updated_at"]
irb(main):012:0> Userinfo.column_names
=> ["id", "name", "created_at", "updated_at"]
Check the files in `/db/migrate`
Check \db\schema.rb: This may be the most reliable method.
While there are methods to check in the console as shown above, checking the files in /db/migrate may be the most reliable.