I have the following line in my create action:
@financial_goal = current_user.send("build_#{type.underscore}",financial_goal_params)
I'm having trouble with the build method not being defined, because I have not done a :has_one on my User model for all my STI subclasses.
As I explain it, I think I am coming to two options:
A) Instantiate the object straight from the subclass, and skip using build_
then just append the user_id: current_user.id
B) Add all the subclasses as has_one
under my user.rb, but that already sounds horrible since every time I create new subclass I'll have to add the association.
Looks like option A it is?