title: Reload column names in ActiveRecord model class
body: <p>I have a script using ActiveRecord that creates column names dynamically based on values read from a CSV file, something like this:</p>
  
  <pre><code>FasterCSV.foreach('votes.csv', :headers =&gt; true) do |row|
    column_name = "roll_call_id_#{row['roll_call_id']}"
  
    if !Legislator.columns.map(&amp;:name).include?(column_name)
      connection_pool.connection.add_column('legislators', column_name, 'string')
    end
  end
  </code></pre>
  
  <p>The problem is that, after creating the new column, I can't do a <code>legislator.update_attribute(column_name, value)</code> because the class doesn't pick up the new column and complains it doesn't exist.</p>
  
  <p>How can I make it query the table structure again?</p>