title: How to get all values of an object in ActiveRecord in Rails?
body: <p>One can use <code>column_names</code> to get all the columns of a table, but what if one would like to know all the values of a particular instance in ActiveRecord.</p>
  
  <p>For example,</p>
  
  <pre><code>User.column_names
  =&gt; ["id", "email", "encrypted_password", "reset_password_token", "reset_password_sent_at", "remember_created_at", "sign_in_count", "current_sign_in_at", "last_sign_in_at", "current_sign_in_ip", "last_sign_in_ip", "tel", "interests", "admin_status", "created_at", "updated_at", "city_id", "profile_image_file_name", "profile_image_content_type", "profile_image_file_size", "profile_image_updated_at"]
  
  User.first
  =&gt; #&lt;User id: 1, email: "aatir@jpl.com", tel: "+923223333333", interests: "Hi, I'm interested in coding.", admin_status: "download", created_at: "2016-08-16 22:38:05", updated_at: "2016-08-16 22:38:05", city_id: 2, profile_image_file_name: "Screen_Shot_2016-07-02_at_4.41.32_PM.png", profile_image_content_type: "image/png", profile_image_file_size: 324372, profile_image_updated_at: "2016-08-16 22:38:04"&gt;
  </code></pre>
  
  <p>When <code>first</code> method is called, it returns key-value pairs. What I want is to have only values, is there a single method in ActiveRecord that can do this for us?</p>