How the replacement of auth_token field is working in below scenario
<pre><code>class User &lt; ActiveRecord::Base
    def facebook
        @facebook ||=  Koala::Facebook::API.new(oauth_token)
    end
end
</code></pre>

<p>In the rails console </p>

<pre><code>user = User.first 
user.facebook.get_object("me")
</code></pre>

<p>First question is, User model has a column called oauth_token, which is magically getting replaced in <code>Koala::Facebook::API.new(oauth_token)</code> here, even though I am not passing oauth_token explicitly</p>

<p>Second question, what is the need of caching @facebook variable here? I am following this rails casts tutorial
<a href="https://www.youtube.com/watch?v=JqeZy2G2C1g" rel="nofollow">https://www.youtube.com/watch?v=JqeZy2G2C1g</a></p>