I am setting up the Single Table Inheritance, using ContactEvent as the Model that ContactEmail, ContactLetter, and ContactCall will all inherit.
But I'm stumped on how to create the routing and the controller.
For example, let's say I want to create a new ContactEvent with type Email.
I would like a way to do the following:
new_contact_event_path(contact, email)
This would take the instance from Contact model and from Email model.
Inside, I would imagine the contact_event_controller would need to know...
@contact_event.type = (params[:email]) # get the type based on what was passed in?
@contact_event.event_id = (params[:email]) #get the id for the correct class, in this case Email.id
Just not sure how this works....