Sean ~ <br><br>I definitely thing this is a good use of STI.&nbsp; How you break out the functionality will largely depend on how common elements are between the different types of people.&nbsp; For instance you say that the search results will look the same so lets say you have a controller called Person and an action called Search.&nbsp; This action could be shared by all Persons, and use the same view.&nbsp; When you go to the detail view however, you say you will have different needs.&nbsp; You could create individual controllers, but again unless there is a lot of functionality, I would put it in the Person Controller, staff_detail action, student_detail action, and so on.&nbsp; The urls would look nice&nbsp; too:
<br><br>/person/staff_detail<br>/person/student_detail... and so on.<br><br>Anyhow just some thoughts to get you going.<br><br>~ Ben<br><br><div><span class="gmail_quote">On 1/30/06, <b class="gmail_sendername">Sean Hussey
</b> &lt;<a href="mailto:seanhussey@gmail.com">seanhussey@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi everyone,
<br><br>We have different populations of people here at our college: Staff,<br>Faculty, Students, Alumni (and a host of &quot;Other&quot; that I'll worry about<br>another day.<br><br>I originally had only Staff and Faculty loaded in under a Person model
<br>using a Personnel controller.&nbsp;&nbsp;Now I want to add the students in, so I<br>thought STI might be the way to go:<br><br>class Person &lt; AR::Base<br>end<br>class Staff &lt; Person<br>end<br>class Faculty &lt; Person<br>
end<br>class Student &lt; Person<br>end<br><br>My question is, where do I put everything?&nbsp;&nbsp;They'll all have similar<br>search result listings, different info detail listings, the same<br>&quot;check password&quot; and &quot;change password&quot; functions.
<br><br>I think it sounds nice to have one controller, but then the list and<br>search methods turn UGLY when trying to account for what the user is<br>actually looking for.&nbsp;&nbsp;My search methods are already ugly with all the
<br>checking for whatever attribute the user is trying to search on.<br><br>Multiple controllers would break it out, but then there wouldn't be<br>much that's DRY about it.<br><br>Where to go?&nbsp;&nbsp;What to do?<br><br>Thanks,<br>
<br>Sean<br>_______________________________________________<br>Rails mailing list<br><a href="mailto:Rails@lists.rubyonrails.org">Rails@lists.rubyonrails.org</a><br><a href="http://lists.rubyonrails.org/mailman/listinfo/rails">
http://lists.rubyonrails.org/mailman/listinfo/rails</a><br></blockquote></div><br><br clear="all"><br>-- <br>Ben Reubenstein<br><a href="http://www.benr75.com">http://www.benr75.com</a>