I have a text field that accepts any number of rows of input, with four columns. Valid input might be:
1 2 3 A
3 4 2 B
1 3 2 C
etc..
Normally with ActiveBase, fields would be generated by whatever model that you have using the form_for method, however, I do not wish to do that here, because then the user would have to fill out a form for each row of input, then submit, when instead I just want the user to paste any number of rows, and press submit once.
After submitting, a service call will be made with a JSON representation of all of the models that were created. I figured that having this textarea populate N number of models would ensure validation, and I could easily throw out bad requests.
I am unsure how to parse and post this data in 'simple rails fashion', given that the form isn't generated using form_for and the fact that multiple of the same model can be created.
So the real question is, how do I structure this? What does my workflow look like?