title: ActiveRecord attributes reading and writing
body: <p>Imagine we have User model and it has name.
  We can simply read and write it:</p>
  
  <pre><code>user = User.new
  user.name = "Peter Griffin"
  user.name #=&gt; "Peter Griffin"
  </code></pre>
  
  <p>Also we can do it via attributes hash (keys are strings):</p>
  
  <pre><code>user.attributes["name"] = "Peter Griffin"
  user.attributes["name"] #=&gt; "Peter Griffin"
  </code></pre>
  
  <p>And with some other strange hash (keys are symbols this time):</p>
  
  <pre><code>user[:name] = "Peter Griffin"
  user[:name] #=&gt; "Peter Griffin"
  </code></pre>
  
  <p>What is the difference between this methods? Is there particular cases when we need to use hashes instead of methods? Also I'll be thankful for links to documentation,  because I didn't find good docs on attributes.</p>