title: How do I define a relationship between activerecord and activeresource using foreign keys?
body: <p>I have a local user model which uses activerecord. The user has an email field. I also have an activeresource model called tasks which has a created_by field which stores the submitting users email address. I'd like to link the two but I'm struggling with the right syntax or even whether it's possible. </p>
  
  <p>The main branch of ActiveResource doesn't even seem to support foreign key. I found an <a href="https://github.com/sephinroth/activeresource/commit/bd74cf238e8f78b49917339ef12b77da91080ae9" rel="noreferrer">alternative branch</a> but still couldn't get anything working.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
     has_many :tasks
  end
  
  class Task &lt; ActiveResource::Base
    belongs_to :user
    schema do
      string 'created_by' #email
      # other fields
    end
  end
  </code></pre>