I'm trying to build a model which render/process partials from others models. Basically, a master model would provide some generic features while embedding different models depending on user input.
In other words, within the same model, I need to render "_form.html.erb" from various models and save them as a nested model would do.
I know nested model would do the work if it was always the same type of model.
class Master < ActiveRecord::Base
has_one :{change depending on user input}
accepts_nested_attributes_for :{change depending on user input}
end
I seen polymorphic models but it seems to do the exact opposite (i.e. one partial in multiple models).
Any ideas? Polymorphic nested model or something?