I have two classes "Person" and "Group" which are derived from a base class "Entity" via Rails Single Table Inheritance pattern. This pattern has DRYed up a lot of my code.
Entity itself has no relations (e.g. has_many) but Person and Group have their specific ones.
Continuing the process of simplifying my code, any changes to a person or group object are PUT against /entities/:id, triggering the update action.
Enter the problem: Rails uses attr_accessible and the relations a class has to build the params[:entity] object. Since certain things I may PUT (like operator_attributes, specific to Group) only appear in Group but not Entity, Rails does not include these in params[:entity].
How can I work around this problem while still using the Entity controller and without having to rewrite the Rails logic for building up params[:entity]?