title: undefined method image tag
body: <p>I am trying to call image tag in a model and return the image if it exists other wise return null like this :-</p>
  
  <pre><code> def medium_avatar_exists?
      if self.avatar.present?
        image_tag self.avatar.thumb_medium_url
      else
        image_tag "missing-avatar-medium.png"
      end
    end
  </code></pre>
  
  <p>when I call this method from the view :- <code>current_user.medium_avatar_exist?</code> </p>
  
  <p>I get an error saying undefined method image_tag what could be the issue ?</p>