As usual a great article by Ramon!!
Hello and happy Wednesday!
In the last post, we covered a solution towards using the Rails’ Form Helper
accepts_nested_attributes_for to give us a convenient ability to create data fields for multiple models to save and retrieve. This is also known as creating a multi-part form.
At the time I hadn’t figured out how to implement Single Table Inheritance properly, and instead created 2 phone number classes to represent a primary and secondary number. After some quick looking around, I found some pretty insightful tutorials that allowed me to use STI in order to DRY out my two redundant classes from the last post.
What I did Wrong
Lets take a quick look at the code from my last post, in order to demonstrate the problem and set the stage for implementing STI properly in Rails.
I was having an issue with seeing the attribute fields commit or retrieve the…
View original post 670 more words