title: is there way to convert object into another class in ruby
body: <p>let say I have model </p>
  
  <pre><code>User &lt; ActiveRecord::Base
  end
  </code></pre>
  
  <p>and his STI brother</p>
  
  <pre><code>MasqueradeUser &lt; User
  end 
  
  masquerade_user =  MasqueradeUser.find 123
  masquerade_user.class
  # =&gt; MasqueradeUser
  </code></pre>
  
  <p>Ridiculous as it sounds, is possible to convert this object back to parent class <code>User</code></p>
  
  <pre><code>masquerade_user.some_magic.class   # =&gt; User
  </code></pre>
  
  <p>I know I can override methods like <code>mode_name</code>, <code>is_a?(User)</code> and other so that MasqueradeUser will return values like <code>User</code></p>
  
  <pre><code>MasqueradeUser &lt; User
    def model_name
      'User'
    end
  end 
  </code></pre>
  
  <p>I was just wondering if there is a way to completely downgrade object to parent class instance  </p>