We have different populations of people here at our college: Staff,
Faculty, Students, Alumni (and a host of “Other” that I’ll worry about
I originally had only Staff and Faculty loaded in under a Person model
using a Personnel controller. Now I want to add the students in, so I
thought STI might be the way to go:
class Person < AR::Base
class Staff < Person
class Faculty < Person
class Student < Person
My question is, where do I put everything? They’ll all have similar
search result listings, different info detail listings, the same
“check password” and “change password” functions.
I think it sounds nice to have one controller, but then the list and
search methods turn UGLY when trying to account for what the user is
actually looking for. My search methods are already ugly with all the
checking for whatever attribute the user is trying to search on.
Multiple controllers would break it out, but then there wouldn’t be
much that’s DRY about it.
Where to go? What to do?