title: Reuse methods in multiple Rails models
body: <p>Beginner ruby/rails question here. I have a method That I am currently using  in my "User" model. </p>
  
  <p><code>def generate_token(column)
      begin
        self[column] = SecureRandom.urlsafe_base64
      end while User.exists?(column =&gt; self[column])
    end</code></p>
  
  <p>I want to reuse the same method in a different model say my Account model.</p>
  
  <p>Where is a good place to put code like this to be shared between models? 
  Also, in order to get the calling class would I just use "self.class"?</p>
  
  <p>Thanks</p>