title: current_user not working in User model. I'm using Devise
body: <p>I'm learning Ruby on Rails and having hard time defining my current user in User model.</p>
  
  <p>My user model: </p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    devise :database_authenticatable, :confirmable, :registerable,
       :recoverable, :rememberable, :trackable, :validatable
  </code></pre>
  
  <p>...</p>
  
  <pre><code>def downgrade
    self.role = :standard
    current_user.wikis.each { |wiki| wiki.make_public }
    save
  end
  </code></pre>
  
  <p>When I call wikis on current_user I get no method error. I thought devise provides current_user method. Please help and thank you!</p>