Question: Would it be ok to put an "average price" calculation, as below, in the view? 

Or is this against MVC and is it better to do this in the controller?

```
<p>Average price: <%= @seller.total_sales / @seller.num_sales %></p>

```

Answer: 
Neither. Put it in the model. Then it becomes easy to unit test.
Put your business logic where it belongs in the model:

```
<p>Average price: <%= @seller.get_average_price () %></p>

```