title: get attribute of ActiveRecord object by string
body: <p>It is probably a really simple thing but can't find a solution.</p>
  
  <p>I have an ActiveRecord object and want to get an attribute like this:</p>
  
  <pre><code>attribute_name = "name"
  user = User.find(1)
  user.get_attribute_by_name(attribute_name) =&gt; "John"
  </code></pre>
  
  <p>Thanks!</p>