Question about inherit models and view.

I have some models like this:

If you modeled the database as single table inheritance (STI) then this is not that hard. You do A.find(:all) to get the objects and some will be Bs rather than As.

In your view you can test for whether they are A or B to present the right information. Alternatively you can ask them for some piece of information that you use to form the name of a partial that will be specific to that type such as _A_row and _B_row with render :partial => "#{obj.class.name}_row" or something like that.

Michael