<p>So I'm working on a Rails app to get the feeling for the whole thing. I've got a <code>Product</code> model that's a standard ActiveRecord model. However, I also want to get some additional product info from Amazon ECS. So my complete model gets some of its info from the database and some from the web service. My question is, should I:</p>

<ol>
<li><p>Make two models a Product and a ProductAWS, and then tie them together at the controller level.</p></li>
<li><p>Have the Product ActiveRecord model contain a ProductAWS object that does all the AWS stuff?</p></li>
<li><p>Just add all the AWS functionality to my Product model.</p></li>
<li><p>???</p></li>
</ol>

You can use the
```
composed_of
```
relationship in ActiveRecord. You make a regular class with all the attributes that you manage through AWS and specify that your Product-class is composed_of this class. ActiveRecord will handle the delegation of the mapped attributes to and from this class.
See
the documentation of composed_of