Is there anywhere on the net a sample of some basic app (with actions
like create, edit etc.) that uses single table inheritance?
I’m trying to create (my first) app with 2 different types of users and
while it basically works, my code is quite messy.
I.e. i’ve got 2 forms, each for different type of user. To use the same
rhtml files for creating and editing the user, i need to pass to the
form file @action (which action should be performed on submit) and
@submit_value (text on submit button) parameters and in case of edit
action also pass :id => @user to the action. It must be done in every
action in controller that renders a form.
Would it be better (simpler for sure) to create 2 sets of forms, which
would have all fields identical and only differ in action, id passed to
it and value of the submit button?